1.

How To Print Type Of A Variable In Go?

Answer»

Following code PRINTS the type of a VARIABLE

var a, b, C = 3, 4, "FOO"
fmt.Printf("a is of type %Tn", a)

Following code prints the type of a variable −

var a, b, c = 3, 4, "foo"
fmt.Printf("a is of type %Tn", a)



Discussion

No Comment Found