From 109b320c057fee8e57358154f439bcd1fa256bae Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 21 Oct 2019 18:54:21 +0530 Subject: [PATCH] remove redundant conversion --- category.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/category.go b/category.go index 0defa31713..d9e73a0bf0 100644 --- a/category.go +++ b/category.go @@ -15,7 +15,7 @@ func newCommandCategories() CommandCategories { } func (c *commandCategories) Less(i, j int) bool { - return lexicographicLess((*c)[i].Name(), (*c)[j].Name() ) + return lexicographicLess((*c)[i].Name(), (*c)[j].Name()) } func (c *commandCategories) Len() int { @@ -33,8 +33,8 @@ func (c *commandCategories) AddCommand(category string, command *Command) { return } } - newVal := commandCategories(append(*c, - &commandCategory{name: category, commands: []*Command{command}})) + newVal := append(*c, + &commandCategory{name: category, commands: []*Command{command}}) *c = newVal }