In https://go.dev/doc/effective_go#printing
I saw an example for printing our custom string output for the type. 
The code below is from docs. 
func (t *T) String() string {
    return fmt.Sprintf("%d/%g/%q", t.a, t.b, t.c)
}
fmt.Printf("%v\n", t)


But rather the statement should be this right? fmt.Printf("%v\n", 
t.String())
Am I missing something?

Thank you
Nikhilesh

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/21a74232-88b2-4a46-9143-d6ffe27ddedfn%40googlegroups.com.

Reply via email to