I have this type:
type T string
Can I get the underlying type of an object of T
? For example:
package main
import (
"fmt"
"reflect"
)
type T string
func main() {
var t = T("what")
tt := reflect.TypeOf(t)
fmt.Println(tt) // prints T, i need string
}