From fa8ccac0dd161f580fde7ed62bbbd49dcd66ccac Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Wed, 12 Aug 2026 21:41:34 +1000 Subject: [PATCH] ci: pin go 1.25.7 and use module-level go vet - go.mod: go 1.26.5 -> 1.25.7 to match the golang:1.25 CI image (node-lookup convention) - .pre-commit-config: dnephin go-vet runs at repo root (no .go files here since both tools live under cmd/); replace with a local 'go vet ./...' hook (CI pre-commit image has go) --- .pre-commit-config.yaml | 13 ++++++++++++- go.mod | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2e63b82..c270a6f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,5 +13,16 @@ repos: rev: v0.5.1 hooks: - id: go-fmt - - id: go-vet - id: go-unit-tests + + # go-vet at the module level (dnephin's go-vet runs at repo root, which has no + # .go files here since both tools live under cmd/). The CI pre-commit image + # (almalinux9-gobuilder) has go installed. + - repo: local + hooks: + - id: go-vet-mod + name: go vet (module) + entry: go vet ./... + language: system + types: [go] + pass_filenames: false diff --git a/go.mod b/go.mod index 05685ae..14ed845 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module git.unkin.net/unkin/agent-tools -go 1.26.5 +go 1.25.7 require github.com/spf13/cobra v1.10.2