Go reflect Package TypeOf()
TypeOf()
package main/*from ww w.j ava 2 s . com*/ import ( "fmt" "reflect" "strconv" ) func main() { var b bool = true fmt.Println(reflect.TypeOf(b)) var s string = strconv.FormatBool(true) fmt.Println(reflect.TypeOf(s)) }