MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / SliceContainsAll

Function SliceContainsAll

pkg/util/util.go:83–90  ·  view source on GitHub ↗

SliceContainsAll returns true if it finds that all items in the slice for which `predicate` returns true

(slice []T, predicate func(item T) bool)

Source from the content-addressed store, hash-verified

81
82// SliceContainsAll returns true if it finds that all items in the slice for which `predicate` returns true
83func SliceContainsAll[T comparable](slice []T, predicate func(item T) bool) bool {
84 for _, item := range slice {
85 if !predicate(item) {
86 return false
87 }
88 }
89 return true
90}
91
92// ExtractValuesMatchingKeys returns a collection of values which matched a specified set of keys, in the exact order of keys.
93// Given a collection of items, and a collection of keys to match within that collection

Callers 1

resolveReleaseDefectRunFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected