Been enjoying a new convention for Go programming that keeps all the distracting in-line documentation out of most of my code base.
<package>.go
doc.go
and put in <package>.go
insteadlib.go
lib.go
unless necessarylib.go
over multiple tiny filesThis way people coming to the code will automatically open the
<package.go>
file and see the documentation and the public-facing API
and I’ll be completely uninhibited by documentation in lib.go
.
#golang #coding #conventions