Documentation ¶
Index ¶
- func ExitOnError(message string, err error)
- func ExitWithErrorMsg(message string)
- func ExpectFlag(flag, value string)
- func GetClientConfig(kubeConfigPath, kubeContext string) clientcmd.ClientConfig
- func GetRestConfig(kubeConfigPath, kubeContext string) (*rest.Config, error)
- func PanicOnError(err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExitOnError ¶
ExitOnError will print your error nicely and exit in case of error
func ExitWithErrorMsg ¶
func ExitWithErrorMsg(message string)
ExitWithErrorMsg will print the message and quit the program with an error code
func ExpectFlag ¶
func ExpectFlag(flag, value string)
ExpectFlag exits with an error if the flag value is empty
func GetClientConfig ¶
func GetClientConfig(kubeConfigPath, kubeContext string) clientcmd.ClientConfig
GetClientConfig returns a clientcmd.ClientConfig to use when communicating with K8s
func GetRestConfig ¶
GetRestConfig returns a rest.Config to use when communicating with K8s
func PanicOnError ¶
func PanicOnError(err error)
PanicOnError will print the subctl version and then panic in case of an actual error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.