mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 21:59:05 +08:00
20 lines
236 B
Go
20 lines
236 B
Go
package main
|
|
import (
|
|
"reflect"
|
|
"fmt"
|
|
)
|
|
|
|
type B struct {
|
|
Name string
|
|
}
|
|
|
|
func(b *B) Test() {
|
|
|
|
}
|
|
|
|
func main() {
|
|
b := &B{}
|
|
t := reflect.ValueOf(b).Elem().Type()
|
|
//n := reflect.New(t)
|
|
fmt.Println(t.NumMethod())
|
|
} |