#!/bin/sh # Same gates as CI job go (subset before full test): gofmt, vet, golangci-lint. set -euxo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" cd "$ROOT" UNFMT="$(gofmt -l .)" if [ -n "$UNFMT" ]; then echo "gofmt: unformatted files:" >&2 echo "$UNFMT" >&2 exit 1 fi go vet ./... if command -v golangci-lint >/dev/null 2>&1; then golangci-lint run else echo "lint-go: golangci-lint not in PATH, skipping (CI will run it)" >&2 fi