cmd

package
v4.2.0-alpha.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplaceCommandName

func ReplaceCommandName(from, to string, c *cobra.Command) *cobra.Command

ReplaceCommandName recursively processes the examples in a given command to change a hardcoded command name (like 'kubectl' to the appropriate target name). It returns c.

func ResolveResource

func ResolveResource(defaultResource schema.GroupResource, resourceString string, mapper meta.RESTMapper) (schema.GroupResource, string, error)

ResolveResource returns the resource type and name of the resourceString. If the resource string has no specified type, defaultResource will be returned.

func SiblingCommand

func SiblingCommand(cmd *cobra.Command, name string) []string

SiblingCommand returns a sibling command to the given command

func WarnAboutCommaSeparation

func WarnAboutCommaSeparation(errout io.Writer, values []string, flag string)

Types

type FlagExposer

type FlagExposer interface {
	ExposeFlags(cmd *cobra.Command, flags ...string) FlagExposer
}

func ActsAsRootCommand

func ActsAsRootCommand(cmd *cobra.Command, filters []string, groups ...ktemplates.CommandGroup) FlagExposer

Jump to

Keyboard shortcuts

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