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

Method Label

cli/command/formatter/container.go:304–309  ·  view source on GitHub ↗

Label returns the value of the label with the given name or an empty string if the given label does not exist.

(name string)

Source from the content-addressed store, hash-verified

302// Label returns the value of the label with the given name or an empty string
303// if the given label does not exist.
304func (c *ContainerContext) Label(name string) string {
305 if c.c.Labels == nil {
306 return ""
307 }
308 return c.c.Labels[name]
309}
310
311// Mounts returns a comma-separated string of mount names present on the container.
312// If the trunc option is set, names can be truncated (ellipsized).

Callers 1

TestContainerPsContextFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestContainerPsContextFunction · 0.76