8 Coupling and Cohesion Fixes That Made a Go CLI Navigable

go dev.to

I spent 4 months refactoring a Go CLI and tracked every change in a catalog. When I looked at the 60 entries, the largest cluster wasn't about types or error handling — it was about where code lives. Coupling and cohesion problems don't cause bugs. They cause something worse: developers who can't find anything. A function in the wrong file. A type in a junk drawer package. A feature spread across 3 files when it should be in 1. Here are 8 patterns I fixed, each with before/after code from the

Read Full Tutorial open_in_new
arrow_back Back to Tutorials