Re: [go-nuts] When using fmt.Print to print a reflect.Value v, v.Elem() is printed instead. Why?

2021-02-26 Thread clba...@gmail.com
Yes. You have to understand how "fmt.Print," etc., handle types with String() methods. From the docs: package fmt - 5. If an operand implements method String() string, that method will be invoked to convert the object to a string, which will then be formatted as required by the verb (if any

[go-nuts] Re: encoding/xml expose line

2021-04-17 Thread clba...@gmail.com
Don't know what you're trying to do, but the only time I've wanted the line number during decoding is when an error occurs. Then I retrieve it using xml.SyntaxError, assuming that 'error' is of type *xml.SyntaxError. On Friday, April 16, 2021 at 8:44:19 AM UTC-6 Patrick wrote: > Hello all, > >