Skip to content

Latest commit

 

History

History
59 lines (41 loc) · 1.06 KB

README.md

File metadata and controls

59 lines (41 loc) · 1.06 KB

errorx

build-img pkg-img version-img

TODO

Rationale

TODO

Features

  • Simple and easy.
  • Safe & fast.
  • Tested.
  • Dependency-free.

See these docs or GUIDE.md for more details.

Install

Go version 1.18+

go get github.com/cristalhq/errorx

Example

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.

License

MIT License.