Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Better `errors` package for Go

License

NotificationsYou must be signed in to change notification settings

cristalhq/errorx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build-imgpkg-imgversion-img

TODO

Rationale

TODO

Features

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

Seethese docs orGUIDE.md for more details.

Install

Go version 1.18+

go get github.com/cristalhq/errorx

Example

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.

License

MIT License.

About

Better `errors` package for Go

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp