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

Function SliceExcept

pkg/util/util.go:68–70  ·  view source on GitHub ↗
(slice []T, predicate func(item T) bool)

Source from the content-addressed store, hash-verified

66}
67
68func SliceExcept[T any](slice []T, predicate func(item T) bool) []T {
69 return SliceFilter(slice, func(item T) bool { return !predicate(item) })
70}
71
72// SliceContainsAny returns true if it finds an item in the slice where `predicate` returns true
73func SliceContainsAny[T comparable](slice []T, predicate func(item T) bool) bool {

Callers 3

PromptMissingFunction · 0.92
GetAllGitReferencesFunction · 0.92
GitReferenceFunction · 0.92

Calls 1

SliceFilterFunction · 0.85

Tested by

no test coverage detected