mirror of
https://github.com/astaxie/beego.git
synced 2024-11-05 06:30:54 +00:00
12 lines
176 B
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()
|
|
}
|