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)
| 322 | // containerNames contacts the API to get names and optionally IDs of containers. |
| 323 | // In case of an error, an empty list is returned. |
| 324 | func 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. |
| 333 | func prefixWith(prefix string, values []string) []string { |
no outgoing calls
no test coverage detected
searching dependent graphs…