From 4eb5e0aebae8308d7bae310df5763eadcc56e948 Mon Sep 17 00:00:00 2001 From: CodeLingo Bot Date: Tue, 5 Feb 2019 05:45:16 +0000 Subject: [PATCH] Fix error formatting based on best practices from Code Review Comments Signed-off-by: CodeLingo Bot --- cobra/cmd/golden_test.go | 2 +- command.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cobra/cmd/golden_test.go b/cobra/cmd/golden_test.go index 59a5a1c9..21c31a7a 100644 --- a/cobra/cmd/golden_test.go +++ b/cobra/cmd/golden_test.go @@ -61,7 +61,7 @@ func checkLackFiles(expected, got []string) error { } } if len(lacks) > 0 { - return fmt.Errorf("Lack %v file(s): %v", len(lacks), lacks) + return fmt.Errorf("lack %v file(s): %v", len(lacks), lacks) } return nil } diff --git a/command.go b/command.go index 34d1bf36..d15309e7 100644 --- a/command.go +++ b/command.go @@ -674,7 +674,7 @@ func (c *Command) ArgsLenAtDash() int { func (c *Command) execute(a []string) (err error) { if c == nil { - return fmt.Errorf("Called Execute() on a nil Command") + return fmt.Errorf("called Execute() on a nil Command") } if len(c.Deprecated) > 0 {