Skip to content

Commit 4ad5a25

Browse files
committed
Fixing search results
1 parent 6e7a20d commit 4ad5a25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/krew/cmd/search.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ type searchItem struct {
3838
type searchCorpus []searchItem
3939

4040
func (s searchCorpus) descriptions() []string {
41-
var res = make([]string, len(s))
41+
res := make([]string, 0, len(s))
4242
for _, corpus := range s {
4343
res = append(res, corpus.description)
4444
}
4545
return res
4646
}
4747

4848
func (s searchCorpus) names() []string {
49-
var res = make([]string, len(s))
49+
res := make([]string, 0, len(s))
5050
for _, corpus := range s {
5151
res = append(res, corpus.name)
5252
}

0 commit comments

Comments
 (0)