configCompletionFunc returns a Cobra completion function with static values.
(values []string)
| 790 | |
| 791 | // configCompletionFunc returns a Cobra completion function with static values. |
| 792 | func configCompletionFunc(values []string) func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { |
| 793 | return func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) { |
| 794 | return values, cobra.ShellCompDirectiveNoFileComp |
| 795 | } |
| 796 | } |
| 797 | |
| 798 | // configCompletionFuncWithCommas returns a Cobra completion function for comma-separated values. |
| 799 | func configCompletionFuncWithCommas(values []string) func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { |