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

Function daemonNames

cli/command/system/completion.go:189–195  ·  view source on GitHub ↗

daemonNames contacts the API to get name and ID of the current docker daemon. In case of an error, an empty list is returned.

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

Source from the content-addressed store, hash-verified

187// daemonNames contacts the API to get name and ID of the current docker daemon.
188// In case of an error, an empty list is returned.
189func daemonNames(dockerCLI completion.APIClientProvider, cmd *cobra.Command) []string {
190 res, err := dockerCLI.Client().Info(cmd.Context(), client.InfoOptions{})
191 if err != nil {
192 return []string{}
193 }
194 return []string{res.Info.Name, res.Info.ID}
195}
196
197// imageNames contacts the API to get a list of image names.
198// In case of an error, an empty list is returned.

Callers 1

completeEventFiltersFunction · 0.85

Calls 2

ClientMethod · 0.65
InfoMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…