Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableDebug ¶
func DisableDebug()
DisableDebug concurrent safe helper to disable debug information in the stderr.
func EnableDebug ¶
func EnableDebug()
EnableDebug concurrent safe helper to enable debug information in the stderr.
func GetStackTraceInString ¶
GetStackTraceInString return the stack trace utilizing runtime.Caller but only pick the first line that has `/app/`.
Will always return the stack trace even when DisableDebug already called. May be used when just want to get the stack trace without caring the debug state.
func GetStackTraceOnDebug ¶
GetStackTraceOnDebug return information from GetStackTraceInString if the internal state of debug is enabled. It can be enabled with EnableDebug.
May be used when need to get the stack trace only if the debug is enabled, since calling runtime.Caller is expensive.
Types ¶
This section is empty.