gitlab.com/evatix-go/core@v1.3.55/codestack/MethodNamePackageNameUsingStackSkip.go (about) 1 package codestack 2 3 import "runtime" 4 5 func MethodNamePackageNameUsingStackSkip(stackSkipIndex int) (fullMethodName, packageName, methodName string) { 6 pc, _, _, _ := runtime.Caller(stackSkipIndex + defaultInternalSkip) 7 funcInfo := runtime.FuncForPC(pc) 8 fullFuncName := funcInfo.Name() 9 10 return MethodNamePackageName(fullFuncName) 11 }