- Notifications
You must be signed in to change notification settings - Fork0
Better `errors` package for Go
License
NotificationsYou must be signed in to change notification settings
cristalhq/errorx
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
TODO
TODO
- Simple and easy.
- Safe & fast.
- Tested.
- Dependency-free.
Seethese docs orGUIDE.md for more details.
Go version 1.18+
go get github.com/cristalhq/errorx
err:=errorx.Newf("this is the error")iferr!=nil {returnerrorx.Wrapf(err,"something happened")}errAt:=errorx.Newf("happened at: %s",time.Now())iferrAt!=nil {returnerrorx.Trace(err)}iferrorx.Tracing() {println("error tracing is enabled")}
See examples:example_test.go.
About
Better `errors` package for Go
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.