MCPcopy Create free account
hub / github.com/containers/common / stringInSlice

Function stringInSlice

pkg/capabilities/capabilities.go:57–64  ·  view source on GitHub ↗

stringInSlice determines if a string is in a string slice, returns bool

(s string, sl []string)

Source from the content-addressed store, hash-verified

55
56// stringInSlice determines if a string is in a string slice, returns bool
57func stringInSlice(s string, sl []string) bool {
58 for _, i := range sl {
59 if i == s {
60 return true
61 }
62 }
63 return false
64}
65
66var (
67 boundingSetOnce sync.Once

Callers 4

NormalizeCapabilitiesFunction · 0.85
ValidateCapabilitiesFunction · 0.85
MergeCapabilitiesFunction · 0.85

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…