runtime

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package runtime provides functions that interact with Go's runtime system, based on the standard package runtime.

It also provides some auxiliary functions (e.g. function FuncPkg helps to get package name from a package path-qualified function name).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallerFrame

func CallerFrame(skip int) (frame stdruntime.Frame, ok bool)

CallerFrame returns the stack frame information of caller.

skip is the number of stack frames to ascend, with 0 identifying the caller of CallerFrame.

The return value ok is false if the information is unretrievable.

func CallerPkgFunc

func CallerPkgFunc(skip int) (pkg, fn string, ok bool)

CallerPkgFunc returns the full package name and simple function name of its caller.

skip is the number of stack frames to ascend, with 0 identifying the caller of CallerPkgFunc.

The return value ok is false if the information is unretrievable.

func FramePkgFunc

func FramePkgFunc(frame stdruntime.Frame) (pkg, fn string, ok bool)

FramePkgFunc returns the full package name and simple function name of the function in the specified stack frame.

The return value ok is false if the information is unretrievable.

func FuncPkg

func FuncPkg(fn string) string

FuncPkg returns the package name of the function fn.

fn is the package path-qualified function name that uniquely identifies a single function in the program.

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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