MCPcopy Index your code
hub / github.com/coder/coder / OverlapCompare

Function OverlapCompare

coderd/util/slice/slice.go:161–170  ·  view source on GitHub ↗
(a []T, b []T, equal func(a, b T) bool)

Source from the content-addressed store, hash-verified

159}
160
161func OverlapCompare[T any](a []T, b []T, equal func(a, b T) bool) bool {
162 // For each element in b, if at least 1 is contained in 'a',
163 // return true.
164 for _, element := range b {
165 if ContainsCompare(a, element, equal) {
166 return true
167 }
168 }
169 return false
170}
171
172// New is a convenience method for creating []T.
173func New[T any](items ...T) []T {

Callers 1

OverlapFunction · 0.85

Calls 1

ContainsCompareFunction · 0.85

Tested by

no test coverage detected