caller

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

package caller implements easy use of metadata for caller functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name() string

Name return caller function name and line number information

based on runtime.Caller

func NameSkip

func NameSkip(skip int) string

NameSkip is similar to Name but with skip specified

note: NameSkip(1) is equivalent to runtime.Caller(0)

func Nm

func Nm() string

Nm return caller function abbr and line number information

based on runtime.Caller

func NmSkip

func NmSkip(skip int) string

NmSkip is similar to Nm but with skip specified

note: NmSkip(1) is equivalent to runtime.Caller(0)

func Path

func Path() string

Path return caller file name and line number information

note: Path(1) is equivalent to runtime.Caller(0)

func PathSkip

func PathSkip(skip int) string

PathSkip is similar to Path but with skip specified

note: PathSkip(1) is equivalent to runtime.Caller(0)

func ShortPathSkip added in v0.5.0

func ShortPathSkip(skip int) string

ShortPathSkip is similar to PathSkip but in short string form

note: ShortPathSkip(1) is equivalent to runtime.Caller(0)

Types

This section is empty.

Jump to

Keyboard shortcuts

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