Contributing
Getting started
git clone https://github.com/bakhod1r/errorx
cd errorx
make all
Before opening a pull request
make fmt vet testpasses.- New behavior comes with tests; adapter changes come with a test that feeds the
real driver error type through
HandleError. go mod tidyleavesgo.modandgo.sumunchanged.
Where code goes
- Root package:
AppError, the registry, layer mapping, hooks, retries. It must stay free of driver dependencies. adapter/<driver>: one package per third-party driver, exposingHandleError. A new adapter also registers itsEXT_*codes incodes_external.goandcodes_domain.go, because the registry lives in the root package.reporter/<transport>: alert delivery.
Error codes
Business codes are not accepted into this repository — applications register
their own with errorx.RegisterDomainCode. Codes that describe infrastructure
(repository, service, handler, external drivers) do belong here.