From 1f90c779f29331e8cf2843716be00ba223da0595 Mon Sep 17 00:00:00 2001 From: Alex Flint Date: Mon, 19 Apr 2021 22:32:47 -0700 Subject: [PATCH] put back call to Addr() --- scalar.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scalar.go b/scalar.go index 63befed..5e3af55 100644 --- a/scalar.go +++ b/scalar.go @@ -77,7 +77,6 @@ func ParseValue(v reflect.Value, s string) error { } // If it implements encoding.TextUnmarshaler then use that - fmt.Println("attempt 1...") if matched, err := parseAsTextUnmarshaler(v, s); matched { 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 // via TextUnmarshaler as well if v.CanAddr() { - fmt.Println("attempt 2...") - if matched, err := parseAsTextUnmarshaler(v, s); matched { + if matched, err := parseAsTextUnmarshaler(v.Addr(), s); matched { return err } }