MCPcopy Create free account
hub / github.com/containerd/nerdctl / remove

Method remove

pkg/cmd/container/stats.go:66–72  ·  view source on GitHub ↗

remove is from https://github.com/docker/cli/blob/3fb4fb83dfb5db0c0753a8316f21aea54dab32c5/cli/command/container/stats_helpers.go#L36-L42

(id string)

Source from the content-addressed store, hash-verified

64
65// remove is from https://github.com/docker/cli/blob/3fb4fb83dfb5db0c0753a8316f21aea54dab32c5/cli/command/container/stats_helpers.go#L36-L42
66func (s *stats) remove(id string) {
67 s.mu.Lock()
68 if i, exists := s.isKnownContainer(id); exists {
69 s.cs = append(s.cs[:i], s.cs[i+1:]...)
70 }
71 s.mu.Unlock()
72}
73
74// isKnownContainer is from https://github.com/docker/cli/blob/3fb4fb83dfb5db0c0753a8316f21aea54dab32c5/cli/command/container/stats_helpers.go#L44-L51
75func (s *stats) isKnownContainer(cid string) (int, bool) {

Callers 1

StatsFunction · 0.95

Calls 2

isKnownContainerMethod · 0.95
LockMethod · 0.65

Tested by

no test coverage detected