MCPcopy Create free account
hub / github.com/DNAProject/DNA / arrayEqual

Function arrayEqual

cmd/utils/params_test.go:89–99  ·  view source on GitHub ↗
(a1, a2 []interface{})

Source from the content-addressed store, hash-verified

87}
88
89func arrayEqual(a1, a2 []interface{}) (bool, error) {
90 data1, err := json.Marshal(a1)
91 if err != nil {
92 return false, fmt.Errorf("json.Marshal:%s error:%s", a1, err)
93 }
94 data2, err := json.Marshal(a2)
95 if err != nil {
96 return false, fmt.Errorf("json.Marshal:%s error:%s", a2, err)
97 }
98 return string(data1) == string(data2), nil
99}

Callers 2

TestParseRawParamsArrayFunction · 0.85
TestParseParamsFunction · 0.85

Calls 2

MarshalMethod · 0.80
ErrorfMethod · 0.80

Tested by

no test coverage detected