Commit

505b5d8

One thing that often trips up developers switching from PHP to Go is how easily the package-level namespace gets crowded. While both languages treat files in the same directory as sharing a namespace, PHP code rarely uses standalone functions—it packages almost everything as class methods. Go, on the other hand, relies heavily on package-level functions, which often leads to function name collisions and clutter within the same directory. To solve this, I built a linter that simulates file-scoped organization and keeps the codebase clean through function naming constraints. If you write Go, I’d love for you to try it out—almost any codebase can benefit from it! https://github.com/mpyw/declscope If you find this project helpful, please consider giving it a star on GitHub!
GitHubGitHub - mpyw/declscope: Keep Go packages flat without losing their internal boundaries: file-level private and package scopes for declarations, methods and struct fieldsKeep Go packages flat without losing their internal boundaries: file-level private and package scopes for declarations, methods and struct fields - mpyw/declscope

commit 505b5d8