Skip to content

Commit 71dec30

Browse files
committed
making array using the make command
1 parent 16cde1e commit 71dec30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func listCmd() *cobra.Command {
193193
if onlyName {
194194
fmt.Fprintln(w, np.Name)
195195
} else {
196-
typeList := []string{}
196+
typeList := make([]string, 0, len(np.Types))
197197
for k := range np.Types {
198198
typeList = append(typeList, k)
199199
}

0 commit comments

Comments
 (0)