caller

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCaller

func GetCaller(callDepth int, suffixesToIgnore ...string) (file string, line int)

getCaller returns the filename and the line info of a function further down in the call stack. Passing 0 in as callDepth would return info on the function calling getCallerIgnoringLog, 1 the parent function, and so on. Any suffixes passed to getCaller are path fragments like "/pkg/log/log.go", and functions in the call stack from that file are ignored.

func GetCallerIgnoringLogMulti

func GetCallerIgnoringLogMulti(callDepth int) (string, int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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