Documentation
¶
Index ¶
- func FuncName(f interface{}) string
- func GetCallStacks(all bool) []byte
- func GetCallersInfo(skip, max int) (callers []string)
- func Go(f func() error) error
- func MustString(v interface{}) string
- func PanicIf(err error)
- func PanicIfErr(err error)
- func Panicf(format string, v ...interface{})
- func PkgName(funcName string) string
- func ToString(v interface{}) string
- func TryString(v interface{}) (string, error)
- func WaitCloseSignals(closer io.Closer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCallStacks ¶ added in v0.4.2
GetCallStacks stacks is a wrapper for runtime. Stack that attempts to recover the data for all goroutines. from glog package
func GetCallersInfo ¶ added in v0.4.2
GetCallersInfo returns an array of strings containing the file and line number of each stack frame leading
func Go ¶ added in v0.4.2
Go is a basic promise implementation: it wraps calls a function in a goroutine and returns a channel which will later return the function's return value.
func MustString ¶
func MustString(v interface{}) string
MustString convert value(basic type) to string, will panic on convert a complex type.
func Panicf ¶
func Panicf(format string, v ...interface{})
Panicf format panic message use fmt.Sprintf
func PkgName ¶ added in v0.4.2
PkgName get current package name
Usage:
funcName := stdutil.FuncName(fn) pgkName := stdutil.PkgName(funcName)
func WaitCloseSignals ¶ added in v0.4.2
WaitCloseSignals for some huang program.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.