make DeepHashObject use SpewKeys

This commit is contained in:
Tim Hockin
2015-04-10 09:38:12 -07:00
parent 942563fda1
commit c989f30a00
2 changed files with 10 additions and 26 deletions

View File

@@ -27,6 +27,11 @@ import (
// ensuring the hash does not change when a pointer changes.
func DeepHashObject(hasher hash.Hash, objectToWrite interface{}) {
hasher.Reset()
printer := spew.ConfigState{Indent: " ", SortKeys: true}
printer := spew.ConfigState{
Indent: " ",
SortKeys: true,
DisableMethods: true,
SpewKeys: true,
}
printer.Fprintf(hasher, "%#v", objectToWrite)
}