MCPcopy
hub / github.com/opencontainers/runc / Remove

Method Remove

libcontainer/configs/namespaces_linux.go:97–104  ·  view source on GitHub ↗
(t NamespaceType)

Source from the content-addressed store, hash-verified

95}
96
97func (n *Namespaces) Remove(t NamespaceType) bool {
98 i := n.index(t)
99 if i == -1 {
100 return false
101 }
102 *n = slices.Delete((*n), i, i+1)
103 return true
104}
105
106func (n *Namespaces) Add(t NamespaceType, path string) {
107 i := n.index(t)

Callers 15

TestRemoveNamespaceFunction · 0.95
RestoreMethod · 0.80
criuNotificationsMethod · 0.80
handleFifoResultFunction · 0.80
createExecFifoMethod · 0.80
deleteExecFifoMethod · 0.80
saveStateMethod · 0.80
runLogForwardingFunction · 0.80
TestCommandHookRunFunction · 0.80
TestIPCHostFunction · 0.80

Calls 1

indexMethod · 0.95

Tested by 9

TestRemoveNamespaceFunction · 0.76
runLogForwardingFunction · 0.64
TestCommandHookRunFunction · 0.64
TestIPCHostFunction · 0.64
TestPIDHostFunction · 0.64
TestHostPidnsInitKillFunction · 0.64
TestDestroyFunction · 0.64