1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-05 08:30:54 +00:00
Beego/utils/caller.go

12 lines
176 B
Go
Raw Normal View History

2013-12-11 14:18:45 +00:00
package utils
import (
"reflect"
"runtime"
)
// get function name
2013-12-11 14:18:45 +00:00
func GetFuncName(i interface{}) string {
return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
}