Documentation
¶
Index ¶
- func Annotation(key, value string) opt.Option[Command]
- func Annotations(annotations map[string]string) opt.Option[Command]
- func Deprecated(reason ...string) opt.Option[Command]
- func Example(example string) opt.Option[Command]
- func Module() module.Module
- func Runner(impl func(cmd *cobra.Command, args []string) error) opt.Option[Command]
- func StringFlag(flag Flag, ptr *string) opt.Option[Command]
- func SuggestFor(alternatives ...string) opt.Option[Command]
- type Command
- type Flag
- type Root
- type RootParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Annotations ¶ added in v0.3.0
Types ¶
type Command ¶
type Command struct { Name string Short string Long string Run func(cmd *cobra.Command, args []string) error Example string Annotations map[string]string Deprecated string SuggestFor []string MutuallyExclusiveFlags []string RequiredFlags []string FlagHandlers map[string]func(cmd *cobra.Command) error }
type Root ¶
type Root struct {
// contains filtered or unexported fields
}
func NewRoot ¶
func NewRoot(params RootParams) *Root
type RootParams ¶
Click to show internal directories.
Click to hide internal directories.