MarkFlagRequired instructs the various shell completion implementations to prioritize the named flag when performing completion, and causes your command to report an error if invoked without the flag.
(flags *pflag.FlagSet, name string)
| 36 | // prioritize the named flag when performing completion, |
| 37 | // and causes your command to report an error if invoked without the flag. |
| 38 | func MarkFlagRequired(flags *pflag.FlagSet, name string) error { |
| 39 | return flags.SetAnnotation(name, BashCompOneRequiredFlag, []string{"true"}) |
| 40 | } |
| 41 | |
| 42 | // MarkFlagFilename instructs the various shell completion implementations to |
| 43 | // limit completions for the named flag to the specified file extensions. |
no outgoing calls
no test coverage detected