mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-06 10:05:58 +08:00
api to rpc use generic paradigm
This commit is contained in:
+6
-2
@@ -38,8 +38,12 @@ func GetSelfFuncName() string {
|
||||
return cleanUpFuncName(runtime.FuncForPC(pc).Name())
|
||||
}
|
||||
|
||||
func GetFuncName(skip int) string {
|
||||
pc, _, _, _ := runtime.Caller(skip + 1)
|
||||
func GetFuncName(skips ...int) string {
|
||||
skip := 1
|
||||
if len(skips) > 0 {
|
||||
skip = skips[0] + 1
|
||||
}
|
||||
pc, _, _, _ := runtime.Caller(skip)
|
||||
return cleanUpFuncName(runtime.FuncForPC(pc).Name())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user