MCPcopy Index your code
hub / github.com/1Panel-dev/KubePi / Difference

Method Difference

pkg/collections/set.go:22–36  ·  view source on GitHub ↗
(items []string)

Source from the content-addressed store, hash-verified

20}
21
22func (s *StringSet) Difference(items []string) []string {
23 result := make([]string, 0)
24 for k, _ := range s.data {
25 exists := false
26 for i := range items {
27 if k == items[i] {
28 exists = true
29 }
30 }
31 if !exists {
32 result = append(result, k)
33 }
34 }
35 return result
36}
37
38func (s *StringSet) ToSlice() []string {
39 result := make([]string, 0)

Callers 1

UpdateUserMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected