Skip to content

reflect

reflect.TypeOf()

Get the data type of a value:

go
var s = "some string"
reflect.TypeOf(s)