The fingerprint.String function here:
func (p *fingerprint) String() string {
json, _ := json.Marshal(p.config)
return procName + "=" + string(json)
}
calls json.Marshal on a config struct that includes the field Method hashMethod, with the definition type hashMethod func() hash.Hash. Marshalling function references isn't supported and will probably behave in unexpected/undesirable ways. In fingerprint/hash.go there is a lookup table mapping strings to hashMethods, and this string form is probably what is intended, so either the Marshal call should be changed or the Config struct should use a more marshal-friendly wrapper for its hash method.
The
fingerprint.Stringfunction here:calls
json.Marshalon a config struct that includes the fieldMethod hashMethod, with the definitiontype hashMethod func() hash.Hash. Marshalling function references isn't supported and will probably behave in unexpected/undesirable ways. Infingerprint/hash.gothere is a lookup table mapping strings tohashMethods, and this string form is probably what is intended, so either theMarshalcall should be changed or theConfigstruct should use a more marshal-friendly wrapper for its hash method.