MCPcopy Create free account
hub / github.com/algolia/cli / StringSliceCompletionFunc

Function StringSliceCompletionFunc

pkg/cmdutil/flags_completion.go:44–51  ·  view source on GitHub ↗

Inspired from https://github.com/cli/cli/blob/trunk/pkg/cmdutil/json_flags.go#L26

(
	allowedMap map[string]string,
	prefixAllDescription string,
)

Source from the content-addressed store, hash-verified

42
43// Inspired from https://github.com/cli/cli/blob/trunk/pkg/cmdutil/json_flags.go#L26
44func StringSliceCompletionFunc(
45 allowedMap map[string]string,
46 prefixAllDescription string,
47) func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
48 return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
49 return runStringSliceCompletion(allowedMap, toComplete, prefixAllDescription)
50 }
51}
52
53func runStringSliceCompletion(
54 allowedMap map[string]string,

Callers 4

NewCreateCmdFunction · 0.92
NewCopyCmdFunction · 0.92
NewImportCmdFunction · 0.92
NewExportCmdFunction · 0.92

Calls 1

runStringSliceCompletionFunction · 0.85

Tested by

no test coverage detected