0 votes
in GoLang by
How would you print type of variable in Go?

1 Answer

0 votes
by

You have to use the following code to print the type of a variable:

  • var a, b, c = 3, 4, "foo"    
  • fmt.Printf("a is of type %T\n", a)  

Related questions

0 votes
asked Aug 19, 2022 in GoLang by john ganales
0 votes
asked Aug 11, 2022 in GoLang by SakshiSharma
...