golang--reflect 經過反射調用方法

1、反射得到方法名 package main import ( "fmt" "reflect" "runtime" ) func main() { pFunc := reflect.ValueOf(OperateFunc).Pointer() funcName := runtime.FuncForPC(pFunc).Name() fmt.Println("方法名爲:", funcN
相關文章
相關標籤/搜索