package runtimeext

import "github.com/go-playground/pkg/v5/runtime"

Index

Types

type Frame

type Frame struct {
	runtime.Frame
}

Frame wraps a runtime.Frame to provide some helper functions while still allowing access to the original runtime.Frame

func Stack

func Stack() Frame

Stack returns a stack Frame

func StackLevel

func StackLevel(skip int) (f Frame)

StackLevel returns a stack Frame skipping the number of supplied frames. This is primarily used by other libraries who use this package internally as the additional.

func (Frame) File

func (f Frame) File() string

File is the runtime.Frame.File stripped down to just the filename

func (Frame) Function

func (f Frame) Function() string

Function is the runtime.Frame.Function stripped down to just the function name

func (Frame) Line

func (f Frame) Line() int

Line is the line of the runtime.Frame and exposed for convenience.

Source Files

stack.go

Version
v5.24.0
Published
Jan 21, 2024
Platform
darwin/amd64
Imports
2 packages
Last checked
1 minute ago

Tools for package owners.