cmdhandler

package
v0.0.0-...-5a3d5de Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallCompletionCmd

func InstallCompletionCmd(rootCmd *cobra.Command)

InstallCompletionCmd adds a subcommand named "completion"

func InstallVerboseFlag

func InstallVerboseFlag(cmd *cobra.Command, destVerbose *int)

InstallVerboseFlag adds the -v and -vv options and will store it to destVerbose.

func NoCmd

func NoCmd(cmd *cobra.Command, args []string)

NoCmd is a no-op command to just make it valid

func RegisterAlias

func RegisterAlias(cmd, parent *cobra.Command)

RegisterAlias allows to decorelate the alias from the main command when alias have different command level (different parents) README and manpage refers to them in each subsection (parents are differents, but only one is kept if we use the same object)

func SubcommandsRequiredWithSuggestions

func SubcommandsRequiredWithSuggestions(cmd *cobra.Command, args []string) error

SubcommandsRequiredWithSuggestions will ensure we have a subcommand provided by the user and augments it with suggestion for commands, alias and help on root command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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