Created
September 12, 2017 02:46
-
-
Save kaleocheng/83aed88b1dafde29279dce9119bdb757 to your computer and use it in GitHub Desktop.
Equals check if two Resources are equals.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Equals check if two Resources are equals. | |
func Equals(r1, r2 *Obj) bool { | |
r1JSON, _ := json.Marshal(r1) | |
r2JSON, _ := json.Marshal(r2) | |
if string(r1JSON) == string(r2JSON) { | |
return true | |
} | |
return false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment