MCPcopy Index your code
hub / github.com/cli/cli / sliceWithout

Function sliceWithout

pkg/set/string_set.go:39–51  ·  view source on GitHub ↗
(s []string, v string)

Source from the content-addressed store, hash-verified

37}
38
39func sliceWithout(s []string, v string) []string {
40 idx := -1
41 for i, item := range s {
42 if item == v {
43 idx = i
44 break
45 }
46 }
47 if idx < 0 {
48 return s
49 }
50 return append(s[:idx], s[idx+1:]...)
51}
52
53func (s *stringSet) RemoveValues(values []string) {
54 for _, v := range values {

Callers 1

RemoveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected