Remove %w for compatibility with go<1.13
This commit is contained in:
parent
84e7a764db
commit
45d0915afc
2
parse.go
2
parse.go
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue