caller.go 176 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 package utils import ( "reflect" "runtime" ) // get function name func GetFuncName(i interface{}) string { return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name() }