caller

package
v0.0.0-...-15a9a0c Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package caller provides utilities to inspect the caller of a function.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(skip int, pkgs []string)

Check is the implementation of the same-name public function. Check uses packages.Same to compare two packages.

func Func

func Func(skip int) (*runtime.Func, uintptr)

Func is similar to Get but returns *runtime.Func and program counter of the caller.

func FuncWithIgnore

func FuncWithIgnore(skip int, ignore func(curFN, nextFN string) bool) (*runtime.Func, uintptr)

FuncWithIgnore is Get with custom ignore function. If ignore returns true, the function is ignored on counting the number of skips. This method is exported for unit testing.

func Get

func Get(skip int) string

Get is the implementation of the same-name public function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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