MCPcopy Index your code
hub / github.com/apache/casbin / ArrayEquals

Function ArrayEquals

util/util.go:61–72  ·  view source on GitHub ↗

ArrayEquals determines whether two string arrays are identical.

(a []string, b []string)

Source from the content-addressed store, hash-verified

59
60// ArrayEquals determines whether two string arrays are identical.
61func ArrayEquals(a []string, b []string) bool {
62 if len(a) != len(b) {
63 return false
64 }
65
66 for i, v := range a {
67 if v != b[i] {
68 return false
69 }
70 }
71 return true
72}
73
74// Array2DEquals determines whether two 2-dimensional string arrays are identical.
75func Array2DEquals(a [][]string, b [][]string) bool {

Callers 9

testGetAllDomainsFunction · 0.92
testEnforceExFunction · 0.92
testStringListFunction · 0.92
testGetImplicitUsersFunction · 0.92
testArrayEqualsFunction · 0.85
testGetEvalValueFunction · 0.85
Array2DEqualsFunction · 0.85
SortedArray2DEqualsFunction · 0.85

Calls

no outgoing calls

Tested by 7

testGetAllDomainsFunction · 0.74
testEnforceExFunction · 0.74
testStringListFunction · 0.74
testGetImplicitUsersFunction · 0.74
testArrayEqualsFunction · 0.68
testGetEvalValueFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…