Documentation
¶
Index ¶
- Variables
- func Assert()
- func Debug()
- func ErrCodeRegistry(err string)
- func ErrHandle(err interface{}, fn ...func(err *Err))
- func ErrLog(err interface{})
- func FnOf(fn interface{}) (reflect.Value, bool, reflect.Value)
- func GetErrTags() map[string]bool
- func If(b bool, t, f interface{}) interface{}
- func IsNone(val interface{}) bool
- func IsZero(val reflect.Value) bool
- func P(d ...interface{})
- func Panic(err interface{})
- 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 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 Wrap(err interface{}, msg string, args ...interface{})
- type Err
Constants ¶
This section is empty.
Variables ¶
View Source
var Cfg = struct { Debug bool MaxObj uint8 MaxRetryDur time.Duration }{ Debug: true, MaxObj: 15, MaxRetryDur: time.Hour * 24, }
View Source
var ErrTags = struct { UnknownTypeCode string }{ "errors_unknown_type", }
Functions ¶
func ErrCodeRegistry ¶ added in v0.2.2
func ErrCodeRegistry(err string)
func GetErrTags ¶ added in v0.2.2
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.