commandutils

package
v1.30.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EditorEnvs = []string{"KUBE_EDITOR", "EDITOR"}

Functions

func CompleteClusterName added in v1.21.3

func CompleteClusterName(f Factory, suppressIfArgs bool, suppressArgs bool) func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompleteClusterName returns a Cobra completion function for cluster names.

func CompletionError added in v1.21.3

func CompletionError(prefix string, err error) ([]string, cobra.ShellCompDirective)

CompletionError a helper function to logs and return an error from a Cobra completion function.

func ConfigureKlogForCompletion added in v1.21.3

func ConfigureKlogForCompletion()

ConfigureKlogForCompletion configures Klog to not interfere with Cobra completion functions.

func ExitWithError

func ExitWithError(err error)

ExitWithError will terminate execution with an error result It prints the error to stderr and exits with a non-zero exit code

Types

type Factory added in v1.21.3

type Factory interface {
	KopsClient() (simple.Clientset, error)
	VFSContext() *vfs.VFSContext
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL