Documentation
¶
Overview ¶
Package runtimehelper contains runtime package helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallerCallerName ¶
func CallerCallerName() string
CallerCallerName returns the name of the function that called the function that called CallerCallerName. In case of any failure an empty string is returned.
The //go:noinline pragma keeps CallerCallerName as its own stack frame so that the fixed skip count passed to NthCallerName stays correct.
func CallerName ¶
func CallerName() string
CallerName returns the name of the function that called CallerName. In case of any failure an empty string is returned.
The //go:noinline pragma keeps CallerName as its own stack frame so that the fixed skip count passed to NthCallerName stays correct.
func JustFunctionName ¶ added in v0.4.0
JustFunctionName returns just the function name of the full function name (returned by Func.Name). If 'funcName' contains no package separator, it is returned (with generic type parameters stripped) unchanged.
func JustPackageFunctionName ¶ added in v0.4.0
JustPackageFunctionName returns just the function name preceded with the package name of the full function name (returned by Func.Name). Generic type parameters (e.g. "[int]") are stripped from the result.
func NthCallerName ¶ added in v0.2.0
NthCallerName returns the name of the n-th caller function of NthCallerName. In case of any failure an empty string is returned. For n's meaning see runtime.Caller documentation.
Types ¶
This section is empty.