Documentation
¶
Index ¶
- Variables
- func Assert()
- func AssertFn(fn reflect.Value) error
- func Blue(s string) string
- func Cyan(s string) string
- func Debug()
- func ErrHandle(err interface{}, fn ...func(err *Err))
- func ErrLog(err interface{})
- func ErrTagRegistry(tag string)
- func ErrTags() map[string]bool
- func ErrTagsMatch(tag string) bool
- func FuncCaller(callDepth int) string
- func GetCallerFromFn(fn reflect.Value) string
- func Green(s string) string
- func If(b bool, t, f interface{}) interface{}
- func InitDebug()
- func IsDebug() bool
- func IsNone(val interface{}) bool
- func IsZero(val reflect.Value) bool
- func Magenta(s string) string
- func P(d ...interface{})
- func Panic(err interface{})
- func Red(s string) string
- func Resp(fn func(err *Err))
- func Retry(num int, fn func()) (err error)
- func RetryAt(t time.Duration, fn func(at time.Duration))
- func T(b bool, msg string, args ...interface{})
- func TestRun(fn interface{}, desc func(desc func(string) *Test))
- func Throw(fn interface{})
- func Ticker(fn func(dur time.Time) time.Duration)
- func Try(fn interface{}) func(...interface{}) func(...interface{}) (err error)
- func TryRaw(fn reflect.Value) func(...reflect.Value) func(...reflect.Value) (err error)
- func White(s string) string
- func Wrap(err interface{}, msg string, args ...interface{})
- func Yellow(s string) string
- type Err
- type Test
Constants ¶
This section is empty.
Variables ¶
View Source
var Cfg = struct { Pkg string Debug bool MaxObj uint8 MaxRetryDur time.Duration }{ Pkg: "errors", Debug: true, MaxObj: 15, MaxRetryDur: time.Hour * 24, }
default config
Functions ¶
func ErrTagRegistry ¶
func ErrTagRegistry(tag string)
func ErrTagsMatch ¶
func FuncCaller ¶
func GetCallerFromFn ¶
Types ¶
type Err ¶
type Err struct {
// contains filtered or unexported fields
}
func (*Err) StackTrace ¶
func (t *Err) StackTrace() *_Err
Click to show internal directories.
Click to hide internal directories.