Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PackageRegexp is regexp search that help us find those lines that // includes function calls in our package and its sub packages. The // following lines help you figure out what kind of lines we are talking // about: // github.com/lainio/err2/try.To1[...](...) // github.com/lainio/err2/assert.Asserter.True(...) PackageRegexp = regexp.MustCompile(`lainio/err2[a-zA-Z0-9_/.\[\]]*\(`) )
Functions ¶
func FprintStack ¶
FprintStack prints the stack trace returned by runtime.Stack to the writer. The StackInfo tells what it prints from the stack.
func FuncName ¶ added in v0.8.12
FuncName is similar to runtime.Caller, but instead to return program counter or function name with full path, funcName returns just function name, separated filename, and line number. If frame cannot be found ok is false.
See more information from runtime.Caller. The StackInfo tells how many stack frames we should go back (Level), and other fields tell how to find the actual line where calculation should be started.
func PrintStack ¶
func PrintStack(stackLevel int)
PrintStack prints to standard error the stack trace returned by runtime.Stack by starting from stackLevel.
Types ¶
Click to show internal directories.
Click to hide internal directories.