MCPcopy Index your code
hub / github.com/docker/cli / pluginNames

Function pluginNames

cli/command/system/completion.go:241–251  ·  view source on GitHub ↗

pluginNames contacts the API to get a list of plugin names. In case of an error, an empty list is returned.

(dockerCLI completion.APIClientProvider, cmd *cobra.Command)

Source from the content-addressed store, hash-verified

239// pluginNames contacts the API to get a list of plugin names.
240// In case of an error, an empty list is returned.
241func pluginNames(dockerCLI completion.APIClientProvider, cmd *cobra.Command) []string {
242 res, err := dockerCLI.Client().PluginList(cmd.Context(), client.PluginListOptions{})
243 if err != nil {
244 return []string{}
245 }
246 names := make([]string, 0, len(res.Items))
247 for _, v := range res.Items {
248 names = append(names, v.Name)
249 }
250 return names
251}
252
253// secretNames contacts the API to get a list of secret names.
254// In case of an error, an empty list is returned.

Callers 1

completeObjectNamesFunction · 0.85

Calls 2

PluginListMethod · 0.80
ClientMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…