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

Method ID

cli/command/formatter/container.go:137–142  ·  view source on GitHub ↗

ID returns the container's ID as a string. Depending on the `--no-trunc` option being set, the full or truncated ID is returned.

()

Source from the content-addressed store, hash-verified

135// ID returns the container's ID as a string. Depending on the `--no-trunc`
136// option being set, the full or truncated ID is returned.
137func (c *ContainerContext) ID() string {
138 if c.trunc {
139 return TruncateID(c.c.ID)
140 }
141 return c.c.ID
142}
143
144// Names returns a comma-separated string of the container's names, with their
145// slash (/) prefix stripped. Additional names for the container (related to the

Callers

nothing calls this directly

Calls 1

TruncateIDFunction · 0.85

Tested by

no test coverage detected