GetObjectHash returns an FNV-32a hash of the full object (all fields).
(obj interface{})
| 69 | |
| 70 | // GetObjectHash returns an FNV-32a hash of the full object (all fields). |
| 71 | func GetObjectHash(obj interface{}) string { |
| 72 | hasher := fnv.New32a() |
| 73 | spewPrinter.Fprintf(hasher, "%#v", obj) |
| 74 | return fmt.Sprint(hasher.Sum32()) |
| 75 | } |
| 76 | |
| 77 | // GetObjectHashIgnoreEmptyKeys returns an FNV-32a hash of only the non-zero |
| 78 | // fields of a struct. Adding a new zero-valued field will not change |
no outgoing calls