Golang Typeof

[Solved] Golang Typeof | Go - Code Explorer | yomemimo.com
Question : golang typeof

Answered by : nasty-newt-j11bxm5nc3cq

package main
import ( "fmt" "reflect"
)
func main() { tst := "string" tst2 := 10 tst3 := 1.2 fmt.Println(reflect.TypeOf(tst)) fmt.Println(reflect.TypeOf(tst2)) fmt.Println(reflect.TypeOf(tst3))
}

Source : https://stackoverflow.com/questions/20170275/how-to-find-the-type-of-an-object-in-go | Last Update : Thu, 15 Jul 21

Answers related to golang typeof

Code Explorer Popular Question For Go