解決

func getType(myvar interface{}) {
    valueOf := reflect.ValueOf(myvar)

    if valueOf.Type().Kind() == reflect.Ptr {
        fmt.Println(reflect.Indirect(valueOf).Type().Name())
    } else {
        fmt.Println(valueOf.Type().Name())
    }
}

using reflection in Go to get the name of a struct - Stack Overflow