caller

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContext

func WithContext(ctx context.Context, caller Caller) context.Context

Types

type Caller

type Caller struct {
	PC    uintptr
	Frame runtime.Frame
}

func From

func From(pc uintptr) Caller

func FromContext

func FromContext(ctx context.Context) (Caller, bool)

func New

func New(skip int) Caller

func (Caller) File

func (ca Caller) File() string

func (Caller) Function

func (ca Caller) Function() string

func (Caller) Line

func (ca Caller) Line() int

func (Caller) LogValue

func (ca Caller) LogValue() slog.Value

func (Caller) ShortFile

func (ca Caller) ShortFile() string

func (Caller) ShortFunction

func (ca Caller) ShortFunction() string

Jump to

Keyboard shortcuts

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