cmdutil

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Indentation = "   "
	LineLen     = 80
)

Variables

This section is empty.

Functions

func CLIStringSliceToStringSlice

func CLIStringSliceToStringSlice(origSlice []string, newSlice *[]string)

func EnsureBinary

func EnsureBinary(log logrus.FieldLogger, name, downloadDesc, downloadURL, archiveFileName string) (string, error)

EnsureBinary downloads a binary if it's not found, based on the name of the binary otherwise it returns the path to it.

func GetYesOrNoInput

func GetYesOrNoInput(ctx context.Context) (bool, error)

func NewDescription

func NewDescription(desc, examples string) string

NewDescription creates a description from a long desc and examples. This also formats them and normalizes the formatting.

func Normalize

func Normalize(s string) string

Normalize takes a string and normalizes it.

func RunKubernetesCommand

func RunKubernetesCommand(ctx context.Context, wd string, onlyOutputOnError bool, name string, args ...string) error

RunKubernetesCommand runs a command with KUBECONFIG set. This command runs in the provided working directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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