#!/bin/sh # script/fmt: format all files (writes). set -eu ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" # goimports v0.42.0, 2026-10-05. Run with `go run` at this commit rather # than installed, so it is always this version, whatever is on PATH. GOIMPORTS_REF="golang.org/x/tools/cmd/goimports@009367f5c17a8d4c45a961a3a509277190a9a6f0" main() { cd "$ROOT" gofmt -s -w . go run "$GOIMPORTS_REF" -w . } main "$@"