Commands for working on Go projects. Each command lives under cmd and is added to a project as a module tool:
go get -tool lesiw.io/tools/cmd/vet
go get -tool lesiw.io/tools/cmd/clerkVet checks Go packages with the golang.org/x/tools analysis passes plus analyzers for error handling, line length, testing practice, declaration style, and code modernization. Diagnostics may be suppressed with //ignore directives as supported by lesiw.io/checker.
Run it by its full package path — the short name would refer to the Go distribution's own vet tool:
go tool lesiw.io/tools/cmd/vet ./...The -fix flag applies the suite's suggested fixes:
go tool lesiw.io/tools/cmd/vet -fix ./...Clerk writes standard project scaffolding into the current directory:
go tool lesiw.io/tools/cmd/clerk appThe project types are:
- app — a Go application. Writes a check workflow that checks
formatting, vets, and tests the module through
lesiw.io/gorc and
cross-compiles it, plus an
.editorconfigwith Go formatting settings. - lib — a Go library. The same, tested against the two most recent Go releases.
Clerk records a checksum for every file it writes to a clerk.sum file, managed with lesiw.io/clerk. Files that still match their recorded checksum are updated in place on later runs; clerk prompts before overwriting or deleting any file that changed since it was last written.
With lesiw.io/gorc installed, a project can bind these commands to go verbs in its go.rc:
vet go tool lesiw.io/tools/cmd/vet $GOARGS $GOFLAGS
clerk go tool lesiw.io/tools/cmd/clerk app