remove redundant conversion
This commit is contained in:
parent
3bd997859c
commit
109b320c05
@ -15,7 +15,7 @@ func newCommandCategories() CommandCategories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *commandCategories) Less(i, j int) bool {
|
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 {
|
func (c *commandCategories) Len() int {
|
||||||
@ -33,8 +33,8 @@ func (c *commandCategories) AddCommand(category string, command *Command) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newVal := commandCategories(append(*c,
|
newVal := append(*c,
|
||||||
&commandCategory{name: category, commands: []*Command{command}}))
|
&commandCategory{name: category, commands: []*Command{command}})
|
||||||
*c = newVal
|
*c = newVal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user