1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-10 03:10:18 +00:00

add some useful func

This commit is contained in:
skyblue
2013-12-11 22:18:45 +08:00
parent 52ebaece73
commit a43a1be0b4
4 changed files with 29 additions and 5 deletions

10
utils/caller.go Normal file
View File

@ -0,0 +1,10 @@
package utils
import (
"reflect"
"runtime"
)
func GetFuncName(i interface{}) string {
return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
}