nit is an opinionated Code Organization linter for Go.
It defines a collection of rules to determine how each Go file should be organized internally.
imports is the first section
type is the second section
//- comment for separating groupsconst is the third section
var is the fourth section
func is the fifth section
//- comment for separating groups.func method, is the sixth section
//- comment for separating groups.Fancy State Machine explaining the rules above:

go (< 11.1): go install github.com/MarioCarrion/nit/cmd/nit or download a precompiled release.go (>= 1.11): GO111MODULE=on go get github.com/MarioCarrion/nit/cmd/[email protected], for installing v0.6.0 for example; see the releases for other versions.tools.go paradigm:// +build tools
// tools.go content
package tools
import (
_ "github.com/go-swagger/go-swagger/cmd/swagger"
)
After installing you can use:
nit -pkg <base local package> $(go list ./...)
Please use nit -h for other available arguments.
Go >= 1.13.1
Content type
Image
Digest
Size
113 MB
Last updated
almost 7 years ago
docker pull mariocarrion/nit:v0.6.4