直接打印:
tm := “str” fmt.Printf(“%T”,tm)
利用reflect获取:
import “reflect” ...... var v1 = reflect.TypeOf(tm) fmt.Println(v1)
Add Comment
Add Comment