I have found that when organizing my projects I have lots of internal packages. These packages have different "layers" of usage where the main is the top layer and low level api are bottom layer and theirs interfaces in between. And my rule is that layers can only access packages below them.
I would like to be able to separate each layer into a separate internal folder (/internal/layer1 /internal/layer2) but I am not sure how to do this as the project structure seems to not lint or compile correctly when i use subfolders in the internal folder. (but these layers are all internal and not meant to be reused by external sources)
Is there any way to implement package subfolders in a go project?
(Also if anyone has any critique on how I setup my projects I would love to hear your opinion.)
Here is an example of my typical "layers" to better explain this:
lowest layer: External Packages, External API Implementations, and Databases ex: AWS s3, AWS SES, Sendgrid R2, Cloudflare Turnstile, Postgres, Sqlite, Turnstile.
2nd layer: Generalized Packages with interfaces that allow for redundancy and easily switching out providers/services, Email(api for sending email using multiple email providers), Translate(mutli provider support), Captcha(multi), Database(multi), FileStorage(multi).
3rd layer: Specific separate pieces of the app, Blog, ComplexLandingPage, Application, Authentication, Logging
top layer: package main: main.go and router
