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

Function isKnownCapName

pkg/cmd/container/run_security_linux.go:196–206  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

194)
195
196func isKnownCapName(s string) bool {
197 knownCapNamesOnce.Do(func() {
198 known := cap.Known()
199 knownCapNames = make(map[string]struct{}, len(known))
200 for _, f := range known {
201 knownCapNames[f] = struct{}{}
202 }
203 })
204 _, ok := knownCapNames[s]
205 return ok
206}
207
208func generateCapOpts(capAdd, capDrop []string) ([]oci.SpecOpts, error) {
209 if len(capAdd) == 0 && len(capDrop) == 0 {

Callers 1

canonicalizeCapNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…