From df7113d7ebeec4c3d2b7c41b1ad7f78d945fd9e9 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 14 Nov 2024 09:42:49 +0100 Subject: [PATCH] [27.x] cli: fix non-constant format string in call to errors.Errorf (govet) cli/required.go:17:24: printf: non-constant format string in call to github.com/docker/cli/vendor/github.com/pkg/errors.Errorf (govet) return errors.Errorf("\n" + strings.TrimRight(cmd.UsageString(), "\n")) ^ Signed-off-by: Sebastiaan van Stijn --- cli/required.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/required.go b/cli/required.go index bad1624856..e8edcaafac 100644 --- a/cli/required.go +++ b/cli/required.go @@ -14,7 +14,7 @@ func NoArgs(cmd *cobra.Command, args []string) error { } if cmd.HasSubCommands() { - return errors.Errorf("\n" + strings.TrimRight(cmd.UsageString(), "\n")) + return errors.New("\n" + strings.TrimRight(cmd.UsageString(), "\n")) } return errors.Errorf(