Top 2.8% dependent packages on proxy.golang.org
Top 3.5% dependent repos on proxy.golang.org
proxy.golang.org : github.com/yext/yerrors
Package yerrors wraps golang.org/x/xerrors to support a no-context Wrapper. The party line is that error traces should include meaningful context at each step. If there's no meaningful context to add, then omitting the stack frame is ok. This policy leads to concise stack traces, especially compared to enterprise development in Java. However, the ability to record a stack trace without providing context is useful in some places, and the community-favorite `pkg/errors` supported that. The official solution (xerrors) does not. This package provides a no-context Wrapper that is compatible with xerrors. This package should be used to replace all xerrors usage, due to the last point above. Taking this error as an example: It would include all 3 invocations in the stack trace, e.g. when printed like this: It would include only the two pieces of content in the error message: See xerrors_test.go for a complete example.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/yext/yerrors
License: MIT
Latest release: almost 2 years ago
First release: over 4 years ago
Namespace: github.com/yext
Dependent packages: 4
Dependent repositories: 2
Stars: 8 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 2 months ago