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:
10
utils/caller.go
Normal file
10
utils/caller.go
Normal file
@ -0,0 +1,10 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func GetFuncName(i interface{}) string {
|
||||
return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
|
||||
}
|
Reference in New Issue
Block a user