put back call to Addr()
This commit is contained in:
parent
a081287ba6
commit
1f90c779f2
|
@ -77,7 +77,6 @@ func ParseValue(v reflect.Value, s string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it implements encoding.TextUnmarshaler then use that
|
// If it implements encoding.TextUnmarshaler then use that
|
||||||
fmt.Println("attempt 1...")
|
|
||||||
if matched, err := parseAsTextUnmarshaler(v, s); matched {
|
if matched, err := parseAsTextUnmarshaler(v, s); matched {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -85,8 +84,7 @@ func ParseValue(v reflect.Value, s string) error {
|
||||||
// If it's a value instead of a pointer, check that we can unmarshal it
|
// If it's a value instead of a pointer, check that we can unmarshal it
|
||||||
// via TextUnmarshaler as well
|
// via TextUnmarshaler as well
|
||||||
if v.CanAddr() {
|
if v.CanAddr() {
|
||||||
fmt.Println("attempt 2...")
|
if matched, err := parseAsTextUnmarshaler(v.Addr(), s); matched {
|
||||||
if matched, err := parseAsTextUnmarshaler(v, s); matched {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue