caller

package
v0.0.0-...-b5d9cbe Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: BSD-3-Clause Imports: 1 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 examines the current call stack and panics if a function in the specified frame does not belong to any package in pkgs. Get is used to find the caller with skip.

func Get

func Get(skip int) string

Get returns the package path-qualified name of a function in the current call stack. skip is the number of stack frames to skip, with 0 identifying the frame for Get itself and 1 identifying the caller of Get. Get ignores a function in chromiumos/... calling the same function in go.chromium.org/... . For example if go.chromium.org/tast-tests/cros/foo.Bar calls go.chromium.org/tast/foo.Bar, Get ignores go.chromium.org/tast-tests/cros/foo.Bar.

Types

This section is empty.

Jump to

Keyboard shortcuts

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