From 6f5584efe34a3bcb92c9a4cb2ea1a2b2f42bf5c1 Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 6 Oct 2026 13:48:07 +0000 Subject: [PATCH] Mark github.com/spf13/pflag as a direct dependency in go.mod (closes #246) internal/cli/snapshot_restore_test.go imports github.com/spf13/pflag directly, but go.mod still marked it // indirect. script/precommit runs go mod tidy and fails when that changes go.mod, so the pre-commit hook stopped every commit. This is the go mod tidy output: pflag moves to the direct require block, and go.sum does not change. script/cibuild does not run the tidy, which is why the gate stayed green. Model: opus-5-5 --- TODO.md | 8 ++++++++ go.mod | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index b7958a5..a0c35be 100644 --- a/TODO.md +++ b/TODO.md @@ -22,6 +22,14 @@ the tag exists and is exercised; what is left is merging `next` to # Completed Steps +- 2026-10-06: Made `go.mod` what `go mod tidy` writes, so the + pre-commit hook no longer stops every commit + ([issue #246](https://git.eeqj.de/sneak/vaultik/issues/246)). A test + in `internal/cli` imports `github.com/spf13/pflag` directly, but + `go.mod` still marked it `// indirect`, and `script/precommit` fails + whenever the tidy changes `go.mod`. It is now in the direct `require` + block. + - 2026-10-06: Made the README's steps for restoring on another machine work ([issue #221](https://git.eeqj.de/sneak/vaultik/issues/221)). `config init` wrote a placeholder recipient that `config.Load` diff --git a/go.mod b/go.mod index 23e63f2..e8d6235 100644 --- a/go.mod +++ b/go.mod @@ -20,6 +20,7 @@ require ( github.com/rclone/rclone v1.72.1 github.com/spf13/afero v1.15.0 github.com/spf13/cobra v1.10.1 + github.com/spf13/pflag v1.0.10 github.com/stretchr/testify v1.11.1 go.uber.org/fx v1.24.0 golang.org/x/sync v0.18.0 @@ -225,7 +226,6 @@ require ( github.com/smarty/assertions v1.16.0 // indirect github.com/sony/gobreaker v1.0.0 // indirect github.com/spacemonkeygo/monkit/v3 v3.0.25-0.20251022131615-eb24eb109368 // indirect - github.com/spf13/pflag v1.0.10 // indirect github.com/t3rm1n4l/go-mega v0.0.0-20251031123324-a804aaa87491 // indirect github.com/tidwall/gjson v1.18.0 // indirect github.com/tidwall/match v1.1.1 // indirect