using %#v

as in

https://play.golang.org/p/VVqUVsfzx6e



    log.Printf("Hello, playground %#v\n", ret)



On Saturday, February 17, 2018 at 7:05:42 PM UTC-5, Joseph Lorenzini wrote:
>
> Hi all:
>
> Per documentation:
>
> "If an operand implements the error interface, the Error method will be 
> invoked to convert the object to a string, which will then be formatted as 
> required by the verb (if any)"
>
> And this is so even if the struct implements the stringer interface. So if 
> I print the struct, I get the error value. Is there anyway to force 
> fmt.Print to output the struct fields, even when it implements the error 
> interface? 
>
> Thanks,
> Joe 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to