Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithOSSignalCancellation ¶
ContextWithOSSignalCancellation builds a new Context that cancels itself on os.Interrupt signals.
Types ¶
type StackFrame ¶
type StackFrame struct { // The path to the file containing this ProgramCounter File string // The LineNumber in that file LineNumber int // The Name of the function that contains this ProgramCounter Name string // The Package that contains this function Package string // The underlying ProgramCounter ProgramCounter uintptr }
A StackFrame contains all necessary information about to generate a line in a call stack.
func Caller ¶ added in v1.1.0
func Caller() *StackFrame
Caller returns the frame of the calling function.
func (*StackFrame) Func ¶
func (f *StackFrame) Func() *runtime.Func
Func returns the function that contained this frame.
func (*StackFrame) String ¶ added in v1.1.0
func (f *StackFrame) String() string
String is the string representation of a StackFrame.
Click to show internal directories.
Click to hide internal directories.