name: gofmt
binary: gofmt
aliases: []
category:
- formatter
lang:
- go
summary: Standard Go source formatter.
homepage: https://github.com/golang/go
docs: https://pkg.go.dev/cmd/gofmt
detect:
version_args: []
local:
files:
- go.mod
- go.work
dirs: []
package_json:
package_manager_prefixes: []
use_when:
- Format Go source files
avoid_when:
- The repository has no Go source files
risk:
level: medium
effects:
- write_files
requires_auth: false
destructive: false
confirmation_required_for:
- formatting large unrelated trees
guardrails:
- Use gofmt on touched files or gofmt -w after reviewing scope.