Modular Layered Design coding with Go - iRi
https://jerf.org/iri/post/2025/go_layered_design/
Go does not allow circular package imports. Here a process for identifying the "breakable link" in a circular dependency and then refactoring the code to remove the circularity by moving functionality to a more appropriate package, creating a third package to hold shared code, or using interfaces to break the dependency.
This layered design approach produces conceptually clear modulated code, with packages that are useful on their own.
originally posted at https://stacker.news/items/949262