Closed TLINDEN closed 1 year ago
I found the problem. "line 1" refers to the first non-comment line. So, this is what caused the warning:
[..]
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package cmd
The empty line above the package line is not allowed, so this is the fix:
[..]
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package cmd
Although I use emacs which calls gofmt -s
everytime I save a go file, it doesn't fix this one issue, for whatever reason.
Hello,
all my source files contain a header like this:
When I run
gofmt -s
locally against such files, it is happy. However, the goreportcard reports:I am pretty sure, this could be easily fixed by just moving the
package cmd
line to the top. But this is not how open source files have to look IMHO.