Documentation ¶
Index ¶
- func ReplaceCommandName(from, to string, c *cobra.Command) *cobra.Command
- func ResolveResource(defaultResource schema.GroupResource, resourceString string, ...) (schema.GroupResource, string, error)
- func SiblingCommand(cmd *cobra.Command, name string) []string
- func WarnAboutCommaSeparation(errout io.Writer, values []string, flag string)
- type FlagExposer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceCommandName ¶
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 ¶
SiblingCommand returns a sibling command to the given command
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
Click to show internal directories.
Click to hide internal directories.