Adopt golangci-lint as your linting tool
vet go tool golangci-lint run $GOARGS
$ go install lesiw.io/gorc/go@latest
Recipes
Syntax
go.rc works by the same rules as //go:generate: no shell, no globs, no syntax. Just environment variables and a cross-platform statement.
Need more? Break into go tool and write your own tooling with command buffers.
release go tool example.com/app/internal/release $GOARGS $GOFLAGS
Adoption
go build, go test, and
go vet are what people, editors,
pipelines, and coding agents already reach for. Quit
adding commands into AGENTS and README files. Inject
them into the verbs everyone already knows.
README.md
AGENTS.md
settings.json
.github/workflows
go.rc
Formatting
Does your project opt into more formatting rules or
sorted imports, but your editors and agents just don't
care? Chain formatters together in a gofmt.rc file and
let the shim expose them through the ordinary gofmt
interface, so -l, -w, and
-d behave exactly as they always have.
gofmt -s $GOFMTFLAGS
go tool gofumpt
Install
go install lesiw.io/gorc/go@latest
go install lesiw.io/gorc/gofmt@latest
export PATH="$(go env GOPATH)/bin:$PATH"
Use go run in CI.
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: stable
- run: go run lesiw.io/gorc/gofmt@latest -l .
- run: go run lesiw.io/gorc/go@latest test ./...