MCPcopy
hub / github.com/apache/casbin / Array2DEquals

Function Array2DEquals

util/util.go:75–86  ·  view source on GitHub ↗

Array2DEquals determines whether two 2-dimensional string arrays are identical.

(a [][]string, b [][]string)

Source from the content-addressed store, hash-verified

73
74// Array2DEquals determines whether two 2-dimensional string arrays are identical.
75func Array2DEquals(a [][]string, b [][]string) bool {
76 if len(a) != len(b) {
77 return false
78 }
79
80 for i, v := range a {
81 if !ArrayEquals(v, b[i]) {
82 return false
83 }
84 }
85 return true
86}
87
88// SortArray2D Sorts the two-dimensional string array.
89func SortArray2D(arr [][]string) {

Callers 11

testDeleteDomainsFunction · 0.92
testGetFilteredPolicyFunction · 0.92
testGetGroupingPolicyFunction · 0.92
testGetPermissionsFunction · 0.92
testArray2DEqualsFunction · 0.85

Calls 1

ArrayEqualsFunction · 0.85

Tested by 11

testDeleteDomainsFunction · 0.74
testGetFilteredPolicyFunction · 0.74
testGetGroupingPolicyFunction · 0.74
testGetPermissionsFunction · 0.74
testArray2DEqualsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…