equals reports whether list1 and list2 contain the same elements, ignoring order.
(list1, list2 []string)
| 89 | |
| 90 | // equals reports whether list1 and list2 contain the same elements, ignoring order. |
| 91 | func 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 | |
| 103 | func check(t *testing.T, err error) { |
| 104 | t.Helper() |
no outgoing calls
no test coverage detected