Closed phlogistonjohn closed 2 years ago
I see that in some places package comments were added via new doc.go and for others existing files were used. Is there a particular reason to do so?
I see that in some places package comments were added via new doc.go and for others existing files were used. Is there a particular reason to do so?
As far as I can tell, not all places have doc.go
. Thus, if doc.go
exists, place the package comment there; otherwise, use another major file.
I see that in some places package comments were added via new doc.go and for others existing files were used. Is there a particular reason to do so?
As far as I can tell, not all places have
doc.go
. Thus, ifdoc.go
exists, place the package comment there; otherwise, use another major file.
Yes, but the patch adds new doc.go files under internal/planner, internal/resources, internal/smbcc and tests/utils/kube whereas comments could have been included within existing files under those directories/packages.
Checking again now I think the criteria is more like minimum number of source files present under a particular directory/package(>3) qualifying for an extra doc.go 😆. But then package smbcc
should not have one 🤨
I see that in some places package comments were added via new doc.go and for others existing files were used. Is there a particular reason to do so?
Yeah, if the the package was a single file and I expect it to stay that way for the near term I just added a comment to the existing file. If the package had many files I added a doc.go (doc.go is a common convention in Go).
Checking again now I think the criteria is more like minimum number of source files present under a particular directory/package(>3) qualifying for an extra doc.go laughing. But then
package smbcc
should not have one raised_eyebrow
I might break that one up in the future.
I'm thinking this PR is ok to merge now. Since it's got one approval my plan is to merge it tomorrow unless I see some explicit NACKs. Thanks.
This will fix errors detected by revive as part of running
make check
. It's genuinely a good thing to have docs, but in some cases they could use a little fleshing out.