Grokking Advanced Go
Vote

0% completed

​

Package Layout and internal

The Go blog post on package names gives this warning: "Packages named util, common, or misc provide clients with no sense of what the package contains."

The warning concerns more than a name. A package is the unit that Go uses for visibility, compilation, and dependency, so the way code is divided into packages determines what can import what. Programmers tend to put unrelated functions in a package called utils, and those functions add unrelated imports.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content