Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lesiw.io/tools

Go Reference CI Release Go Version Discord License

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/clerk

cmd/vet

Vet 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 ./...

cmd/clerk

Clerk writes standard project scaffolding into the current directory:

go tool lesiw.io/tools/cmd/clerk app

The 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 .editorconfig with 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.

go.rc

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

Releases

Packages

Contributors

Languages