mirror of
https://github.com/spf13/cobra
synced 2025-05-05 21:07:24 +00:00
move to non-public fields
This commit is contained in:
parent
16f2a0735a
commit
75cfcdcd47
1 changed files with 3 additions and 3 deletions
|
@ -88,9 +88,6 @@ type Command struct {
|
||||||
// group commands.
|
// group commands.
|
||||||
Annotations map[string]string
|
Annotations map[string]string
|
||||||
|
|
||||||
//flagCompletionFunctions is map of flag completion functions.
|
|
||||||
flagCompletionFunctions map[*flag.Flag]func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective)
|
|
||||||
|
|
||||||
// Version defines the version for this command. If this value is non-empty and the command does not
|
// Version defines the version for this command. If this value is non-empty and the command does not
|
||||||
// define a "version" flag, a "version" boolean flag will be added to the command and, if specified,
|
// define a "version" flag, a "version" boolean flag will be added to the command and, if specified,
|
||||||
// will print content of the "Version" variable. A shorthand "v" flag will also be added if the
|
// will print content of the "Version" variable. A shorthand "v" flag will also be added if the
|
||||||
|
@ -144,6 +141,9 @@ type Command struct {
|
||||||
// that we can use on every pflag set and children commands
|
// that we can use on every pflag set and children commands
|
||||||
globNormFunc func(f *flag.FlagSet, name string) flag.NormalizedName
|
globNormFunc func(f *flag.FlagSet, name string) flag.NormalizedName
|
||||||
|
|
||||||
|
//flagCompletionFunctions is map of flag completion functions.
|
||||||
|
flagCompletionFunctions map[*flag.Flag]func(cmd *Command, args []string, toComplete string) ([]string, ShellCompDirective)
|
||||||
|
|
||||||
// usageFunc is usage func defined by user.
|
// usageFunc is usage func defined by user.
|
||||||
usageFunc func(*Command) error
|
usageFunc func(*Command) error
|
||||||
// usageTemplate is usage template defined by user.
|
// usageTemplate is usage template defined by user.
|
||||||
|
|
Loading…
Add table
Reference in a new issue