trace

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

Package trace provide utility to get stack trace.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location

type Location struct {
	// contains filtered or unexported fields
}

Location of execution

func Get

func Get(skip, deep int) (locations []Location)

Get return list of location of stack trace for calling function.

skip tell Get to skip some trace, 0 is where Get is called. deep tell Get how deep the stack trace is.

func (Location) File

func (l Location) File() string

the File that this Location point to

func (Location) Func

func (l Location) Func() string

the Function that this location point to

func (Location) Line

func (l Location) Line() int

the Line that this Location point to

func (Location) String

func (l Location) String() string

String representation of Location

Jump to

Keyboard shortcuts

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