mirror of
https://github.com/spf13/cobra
synced 2025-05-06 13:27:26 +00:00
Fix error formatting based on best practices from Code Review Comments
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
This commit is contained in:
parent
7547e83b2d
commit
4eb5e0aeba
2 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ func checkLackFiles(expected, got []string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(lacks) > 0 {
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -674,7 +674,7 @@ func (c *Command) ArgsLenAtDash() int {
|
||||||
|
|
||||||
func (c *Command) execute(a []string) (err error) {
|
func (c *Command) execute(a []string) (err error) {
|
||||||
if c == nil {
|
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 {
|
if len(c.Deprecated) > 0 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue