builtinutil

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recovery

func Recovery(err interface{}, options ...zap.Option)

Recovery print input err value. If err is nil, we will try to call recover() to fetch value.

func RecoveryWithContext

func RecoveryWithContext(ctx context.Context, err interface{}, options ...zap.Option)

RecoveryWithContext print input err value with context's logger. If err is nil, we will try to call recover() to fetch value.

func Stack

func Stack(skip int) []byte

Stack returns a nicely formatted stack frame, skipping skip frames.

func UserHomeDir

func UserHomeDir() string

UserHomeDir returns the current user's home directory. Panic if `os.UserHomeDir()` return an error.

func WrappedGo

func WrappedGo(ctx context.Context, callback func(), options ...zap.Option)

Types

This section is empty.

Jump to

Keyboard shortcuts

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