runtimeutil

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: MIT Imports: 3 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package runtimeutil provides wrapper to get caller, stack etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCallerFrame

func GetCallerFrame(skip int) runtime.Frame

see https://github.com/dyweb/gommon/issues/32 based on https://github.com/go-stack/stack/blob/master/stack.go#L29:51 TODO: not sure if calling two Next without checking the more value works for other go version

func IsMethod

func IsMethod(f string) bool

func SplitPackageFunc

func SplitPackageFunc(f string) (pkg string, function string)

SplitPackageFunc returns package (w/o GOPATH) and function (w/ struct if presented) based on runtime.Frame.Function Copied from runtime.Frame struct documentation Func may be nil for non-Go code or fully inlined functions If Func is not nil then Function == Func.Name() github.com/dyweb/gommon/log2/_examples/uselib/service.(*Auth).Check github.com/dyweb/gommon/log2.TestNewIdentityFromCaller

func SplitStructMethod

func SplitStructMethod(f string) (st string, function string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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