From 4762992b706a9d1950a86248720199ae8cd5d3e5 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 14 Dec 2025 11:33:25 +0100 Subject: Fix go vet 1.25.4 "non-constant format string" issues $ go version go version go1.25.4 linux/amd64 $ go vet ./... ./init_dir.go:71:21: non-constant format string in call to (*github.com/rfjakob/gocryptfs/v2/internal/tlog.toggledLogger).Printf ./main.go:123:19: non-constant format string in call to (*github.com/rfjakob/gocryptfs/v2/internal/tlog.toggledLogger).Printf ./masterkey.go:29:20: non-constant format string in call to (*github.com/rfjakob/gocryptfs/v2/internal/tlog.toggledLogger).Printf ./masterkey.go:56:20: non-constant format string in call to (*github.com/rfjakob/gocryptfs/v2/internal/tlog.toggledLogger).Printf ./mount.go:415:20: non-constant format string in call to (*github.com/rfjakob/gocryptfs/v2/internal/tlog.toggledLogger).Printf internal/tlog/log.go:76:18: non-constant format string in call to (*log.Logger).Printf internal/syscallcompat/quirks.go:19:19: non-constant format string in call to (*github.com/rfjakob/gocryptfs/v2/internal/tlog.toggledLogger).Printf --- masterkey.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'masterkey.go') diff --git a/masterkey.go b/masterkey.go index d488441..c67c5d5 100644 --- a/masterkey.go +++ b/masterkey.go @@ -24,9 +24,9 @@ func unhexMasterKey(masterkey string, fromStdin bool) []byte { tlog.Fatal.Printf("Master key has length %d but we require length %d", len(key), cryptocore.KeyLen) os.Exit(exitcodes.MasterKey) } - tlog.Info.Printf("Using explicit master key.") + tlog.Info.Println("Using explicit master key.") if !fromStdin { - tlog.Info.Printf(tlog.ColorYellow + + tlog.Info.Println(tlog.ColorYellow + "THE MASTER KEY IS VISIBLE VIA \"ps ax\" AND MAY BE STORED IN YOUR SHELL HISTORY!\n" + "ONLY USE THIS MODE FOR EMERGENCIES" + tlog.ColorReset) } @@ -52,8 +52,8 @@ func handleArgsMasterkey(args *argContainer) (masterkey []byte) { } // "-zerokey" if args.zerokey { - tlog.Info.Printf("Using all-zero dummy master key.") - tlog.Info.Printf(tlog.ColorYellow + + tlog.Info.Println("Using all-zero dummy master key.") + tlog.Info.Println(tlog.ColorYellow + "ZEROKEY MODE PROVIDES NO SECURITY AT ALL AND SHOULD ONLY BE USED FOR TESTING." + tlog.ColorReset) return make([]byte, cryptocore.KeyLen) -- cgit v1.2.3