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

Function containerNames

cli/command/container/completion.go:324–330  ·  view source on GitHub ↗

containerNames contacts the API to get names and optionally IDs of containers. In case of an error, an empty list is returned.

(dockerCLI completion.APIClientProvider, cmd *cobra.Command, args []string, toComplete string)

Source from the content-addressed store, hash-verified

322// containerNames contacts the API to get names and optionally IDs of containers.
323// In case of an error, an empty list is returned.
324func containerNames(dockerCLI completion.APIClientProvider, cmd *cobra.Command, args []string, toComplete string) []string {
325 names, _ := completion.ContainerNames(dockerCLI, true)(cmd, args, toComplete)
326 if names == nil {
327 return []string{}
328 }
329 return names
330}
331
332// prefixWith prefixes every element in the slice with the given prefix.
333func prefixWith(prefix string, values []string) []string {

Callers 1

completeLinkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…