TODO
TODO
- Simple and easy.
- Safe & fast.
- Tested.
- Dependency-free.
See these docs or GUIDE.md for more details.
Go version 1.18+
go get github.com/cristalhq/errorx
err := errorx.Newf("this is the error")
if err != nil {
return errorx.Wrapf(err, "something happened")
}
errAt := errorx.Newf("happened at: %s", time.Now())
if errAt != nil {
return errorx.Trace(err)
}
if errorx.Tracing() {
println("error tracing is enabled")
}
See examples: example_test.go.