MCPcopy Create free account
hub / github.com/AbelChe/evil_minio / equalAsJSON

Function equalAsJSON

cmd/data-usage_test.go:612–622  ·  view source on GitHub ↗

equalAsJSON returns whether the values are equal when encoded as JSON.

(a, b interface{})

Source from the content-addressed store, hash-verified

610
611// equalAsJSON returns whether the values are equal when encoded as JSON.
612func equalAsJSON(a, b interface{}) bool {
613 aj, err := json.Marshal(a)
614 if err != nil {
615 panic(err)
616 }
617 bj, err := json.Marshal(b)
618 if err != nil {
619 panic(err)
620 }
621 return bytes.Equal(aj, bj)
622}

Callers 1

Calls 1

EqualMethod · 0.45

Tested by

no test coverage detected