stack

package
v0.0.0-...-f5c3557 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package stack provides some utilities for dealing with the call stack.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Caller

func Caller(depth int) (c string)

Caller formats the caller at `depth` like "filename:lineno". Returns "???:1" on error.

func CallerAbove

func CallerAbove(depth int, prefix string) (d int)

CallerAbove finds the depth first calling function, above depth, without the given prefix (package name, etc). If it can't find such a caller, it returns the depth of the stack or the depth of first error.

func ClearTestCaller

func ClearTestCaller() string

ClearTestCaller returns a string that, when printed to a terminal, clears line information typically output by t.Log().

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL