MCPcopy
hub / github.com/cortexlabs/cortex / SubtractStrSlice

Function SubtractStrSlice

pkg/lib/slices/string.go:139–147  ·  view source on GitHub ↗
(slice1 []string, slice2 []string)

Source from the content-addressed store, hash-verified

137}
138
139func SubtractStrSlice(slice1 []string, slice2 []string) []string {
140 result := []string{}
141 for _, elem := range slice1 {
142 if !HasString(slice2, elem) {
143 result = append(result, elem)
144 }
145 }
146 return result
147}
148
149func StrSliceElementsMatch(strs1 []string, strs2 []string) bool {
150 if len(strs1) == 0 && len(strs2) == 0 {

Callers 2

StructFunction · 0.92
StructFromStringMapFunction · 0.92

Calls 1

HasStringFunction · 0.85

Tested by

no test coverage detected