From d72650db8abe817b328754fb2e33137346058f15 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 12 Jun 2019 08:48:16 +0200 Subject: [PATCH] nsscash: replace %s with %v in format string for File.Type File.Type is an int value with a stringer go:generate statement. Using %s breaks running `go test` (which runs `go vet`) before running `go generate`. Using %v has the same result and uses the stringified version when available. --- file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file.go b/file.go index 02bc767..b77cbb6 100644 --- a/file.go +++ b/file.go @@ -39,7 +39,7 @@ func handleFiles(cfg *Config, state *State) error { for i, f := range cfg.Files { err := fetchFile(&cfg.Files[i], state) if err != nil { - return errors.Wrapf(err, "%q (%s)", f.Url, f.Type) + return errors.Wrapf(err, "%q (%v)", f.Url, f.Type) } } @@ -51,7 +51,7 @@ func handleFiles(cfg *Config, state *State) error { err := deployFile(&cfg.Files[i]) if err != nil { - return errors.Wrapf(err, "%q (%s)", f.Url, f.Type) + return errors.Wrapf(err, "%q (%v)", f.Url, f.Type) } } -- 2.45.2