MCPcopy Create free account
hub / github.com/Permify/permify / isSameArray

Function isSameArray

internal/storage/memory/memory_test.go:16–36  ·  view source on GitHub ↗
(a, b []string)

Source from the content-addressed store, hash-verified

14}
15
16func isSameArray(a, b []string) bool {
17 if len(a) != len(b) {
18 return false
19 }
20
21 sortedA := make([]string, len(a))
22 copy(sortedA, a)
23 sort.Strings(sortedA)
24
25 sortedB := make([]string, len(b))
26 copy(sortedB, b)
27 sort.Strings(sortedB)
28
29 for i := range sortedA {
30 if sortedA[i] != sortedB[i] {
31 return false
32 }
33 }
34
35 return true
36}

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected