Documentation ¶
Index ¶
- Constants
- Variables
- func AddGroupedCommands(mainCommand *cobra.Command, group cobra.Group, cmds []*cobra.Command)
- func AllComandsHelpFlag(command *cobra.Command)
- func AppendFlagHelp(flag *pflag.Flag, helpTemplate string) *pflag.Flag
- func GetAvailableEphemeralPort(iface string) (int, error)
- func GetHelp(flag *pflag.Flag) string
- func GetWorkspaceDir() (string, error)
- func GetWorkspaceDirAndShort() (string, string, error)
- func HasHelp(flag *pflag.Flag) bool
- func IsHidden(flag *pflag.Flag) bool
- func MakeSpinner(suffix string) *spinner.Spinner
- func MarkFlag(flag *pflag.Flag, flagTypes ...BoolFlagType) *pflag.Flag
- func MarkFlagRequiredWithHelp(flag *pflag.Flag, helpTemplate string) *pflag.Flag
- func PersistentPreRunChain(command *cobra.Command, args []string) error
- type BoolFlagType
Constants ¶
View Source
const ( StrTrue = "true" StrFalse = "false" )
View Source
const (
HelpTemplate = "bns_annotation_help_template"
)
Variables ¶
View Source
var (
ErrInvalidValue = errors.New("invalid value")
)
Functions ¶
func AddGroupedCommands ¶ added in v0.9.1
func AllComandsHelpFlag ¶ added in v0.10.0
func AppendFlagHelp ¶ added in v0.14.1
func GetAvailableEphemeralPort ¶ added in v0.2.0
func GetWorkspaceDir ¶ added in v0.2.0
func GetWorkspaceDirAndShort ¶ added in v0.10.0
func MakeSpinner ¶ added in v0.2.0
func MarkFlag ¶ added in v0.14.1
func MarkFlag(flag *pflag.Flag, flagTypes ...BoolFlagType) *pflag.Flag
func MarkFlagRequiredWithHelp ¶ added in v0.14.1
Types ¶
type BoolFlagType ¶ added in v0.14.1
type BoolFlagType string
const ( FlagHidden BoolFlagType = "bns_annotation_hidden" FlagRequired BoolFlagType = cobra.BashCompOneRequiredFlag FlagDirname BoolFlagType = cobra.BashCompSubdirsInDir )
Click to show internal directories.
Click to hide internal directories.