mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-06-15 23:29:23 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
commit
8028ee790f
@ -36,6 +36,12 @@ func GetSelfFuncName() string {
|
||||
pc, _, _, _ := runtime.Caller(1)
|
||||
return cleanUpFuncName(runtime.FuncForPC(pc).Name())
|
||||
}
|
||||
|
||||
func GetFuncName(skip int) string {
|
||||
pc, _, _, _ := runtime.Caller(skip + 1)
|
||||
return cleanUpFuncName(runtime.FuncForPC(pc).Name())
|
||||
}
|
||||
|
||||
func cleanUpFuncName(funcName string) string {
|
||||
end := strings.LastIndex(funcName, ".")
|
||||
if end == -1 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user