diff --git a/hashstructure.go b/hashstructure.go index 3dc0eb7..9bcafcf 100644 --- a/hashstructure.go +++ b/hashstructure.go @@ -332,6 +332,9 @@ func (w *walker) visit(v reflect.Value, opts *visitOpts) (uint64, error) { if tag == "string" || w.stringer { if impl, ok := innerV.Interface().(fmt.Stringer); ok { innerV = reflect.ValueOf(impl.String()) + if w.ignorezerovalue && innerV.IsZero() { + continue + } } else if tag == "string" { // We only show this error if the tag explicitly // requests a stringer.