This package allows you to define that certain files/folders can/cannot contain packages. If a simple go.mod lookup works for your needs look at https://github.com/ryancurrah/gomodguard.
For example, I may have a module that has many packages. I can say package A cannot use the reflect package in stdlib as my module has all the reflect logic in package B. I can also say that testify should only be in _test.go files.
This was originally written before go.mod was introduced and I had a mono repository of services. I didn't want certain services to import certain packages without first being vetted.
This package allows you to define that certain files/folders can/cannot contain packages. If a simple go.mod lookup works for your needs look at https://github.com/ryancurrah/gomodguard.
For example, I may have a module that has many packages. I can say package A cannot use the reflect package in stdlib as my module has all the reflect logic in package B. I can also say that testify should only be in _test.go files.
This was originally written before go.mod was introduced and I had a mono repository of services. I didn't want certain services to import certain packages without first being vetted.