1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-26 00:14:14 +00:00
Beego/utils/caller.go

12 lines
176 B
Go

package utils
import (
"reflect"
"runtime"
)
// get function name
func GetFuncName(i interface{}) string {
return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
}