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

Method isKnownContainer

cli/command/container/stats_helpers.go:43–50  ·  view source on GitHub ↗
(cid string)

Source from the content-addressed store, hash-verified

41}
42
43func (s *stats) isKnownContainer(cid string) (int, bool) {
44 for i, c := range s.cs {
45 if c.Container == cid {
46 return i, true
47 }
48 }
49 return -1, false
50}
51
52// snapshot returns a point-in-time copy of the tracked container list
53// (the slice of *Stats pointers). The returned slice is safe for use

Callers 2

addMethod · 0.95
removeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected