achp enforce architectural rules as errors values or unit tests
It has the following features:
- Validate pkgs imports as dependencies.
- Handles custom errs for each architecture policy
Use go get.
go get github.com/gpbPiazza/archp
Then import the archp package into your own code.
import "github.com/gpbPiazza/archp"
Please see https://pkg.go.dev/github.com/gpbPiazza/archp/ for detailed usage docs.
1 .archp depends totally on go/build
package to work, so if your package under test is not in a remote repository it will always return err in the build.Import
function.
2. This first version doesn't support validate a package children packages imports, for example:
-- domain
|-- services
| |-- service.go
|-- models
| |-- model.go
The analysis under domain
package is not supported to validate if the service.go
file or model.go
are following the expected rules.
- solve the especial notes 2. Packages analysis to nested packages dependencies.
- options to use
t *testing.T
Distributed under MIT License, please see license file within the code for more details.