Remove %w for compatibility with go<1.13

This commit is contained in:
Alex Flint 2019-10-21 11:42:03 -07:00 committed by GitHub
parent 84e7a764db
commit 45d0915afc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ func NewParser(config Config, dests ...interface{}) (*Parser, error) {
if defaultVal, ok := v.Interface().(encoding.TextMarshaler); ok { if defaultVal, ok := v.Interface().(encoding.TextMarshaler); ok {
str, err := defaultVal.MarshalText() str, err := defaultVal.MarshalText()
if err != nil { if err != nil {
return nil, fmt.Errorf("%v: error marshaling default value to string: %w", spec.dest, err) return nil, fmt.Errorf("%v: error marshaling default value to string: %v", spec.dest, err)
} }
spec.defaultVal = string(str) spec.defaultVal = string(str)
} else { } else {