Go blocks circular imports. Your test setup shouldn't suffer for it.
β
Use _test packages to decouple helpers
β
Extract interfaces into shared packages
β
Test real DBs with containers β not mocks
β
Write tiny tests first to build coverage momentum
π§ͺ Better structure β better tests β safer deploys
π Full article β https://levelup.gitconnected.com/break-the-dependency-loop-go-testing-tactics-for-2025-21e900f33be1
Top comments (0)