package main
import (
"fmt"
"reflect"
)
type Foo struct {
A int
}
func (f *Foo) Test() {
}
func main() {
f := &Foo{}
t := reflect.TypeOf(f)
fmt.Println(t)
}
when call reflect.TypeOf can get a struct desc the type, i know this type
struct in generate by compiler, and i need to know where is this code, and
how to generate the struct fields and methods?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/169fee4d-7b32-4d38-a7ab-dbd736da341an%40googlegroups.com.