Skip to content

Commit 63286ce

Browse files
authored
Merge pull request #1984 from camilamacedo86/sort-plugins-key
🌱 sort plugins key for the help
2 parents 71b8578 + 386207f commit 63286ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/cli/root.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package cli
1818

1919
import (
2020
"fmt"
21+
"sort"
2122
"strings"
2223

2324
"github.com/spf13/cobra"
@@ -113,6 +114,8 @@ func (c cli) getPluginTable() string {
113114
maxPluginKeyLength, pluginKeysHeader, maxProjectVersionLength, projectVersionsHeader))
114115
lines = append(lines, strings.Repeat("-", maxPluginKeyLength+2)+"+"+
115116
strings.Repeat("-", maxProjectVersionLength+2))
117+
118+
sort.Strings(pluginKeys)
116119
for i, pluginKey := range pluginKeys {
117120
supportedProjectVersions := projectVersions[i]
118121
lines = append(lines, fmt.Sprintf(" %[1]*[2]s | %[3]*[4]s",

0 commit comments

Comments
 (0)