MCPcopy Create free account
hub / github.com/celer-pkg/celer / equals

Function equals

cmds/cmd_test.go:91–101  ·  view source on GitHub ↗

equals reports whether list1 and list2 contain the same elements, ignoring order.

(list1, list2 []string)

Source from the content-addressed store, hash-verified

89
90// equals reports whether list1 and list2 contain the same elements, ignoring order.
91func equals(list1, list2 []string) bool {
92 if len(list1) != len(list2) {
93 return false
94 }
95 for _, item := range list1 {
96 if !slices.Contains(list2, item) {
97 return false
98 }
99 }
100 return true
101}
102
103func check(t *testing.T, err error) {
104 t.Helper()

Callers 4

TestReverseCmd_With_DevFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected