Skip to content

Instantly share code, notes, and snippets.

@kaleocheng
Created September 12, 2017 02:46
Show Gist options
  • Save kaleocheng/83aed88b1dafde29279dce9119bdb757 to your computer and use it in GitHub Desktop.
Save kaleocheng/83aed88b1dafde29279dce9119bdb757 to your computer and use it in GitHub Desktop.
Equals check if two Resources are equals.
// 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