@@ -89,7 +89,7 @@ func (c cli) getPluginTable() string {
89
89
maxPluginKeyLength = len (pluginKeysHeader )
90
90
pluginKeys = make ([]string , 0 , len (c .plugins ))
91
91
maxProjectVersionLength = len (projectVersionsHeader )
92
- projectVersions = make ([ ]string , 0 , len (c .plugins ))
92
+ projectVersions = make (map [ string ]string , len (c .plugins ))
93
93
)
94
94
95
95
for pluginKey , plugin := range c .plugins {
@@ -106,7 +106,7 @@ func (c cli) getPluginTable() string {
106
106
if len (supportedProjectVersionsStr ) > maxProjectVersionLength {
107
107
maxProjectVersionLength = len (supportedProjectVersionsStr )
108
108
}
109
- projectVersions = append ( projectVersions , supportedProjectVersionsStr )
109
+ projectVersions [ pluginKey ] = supportedProjectVersionsStr
110
110
}
111
111
112
112
lines := make ([]string , 0 , len (c .plugins )+ 2 )
@@ -116,8 +116,8 @@ func (c cli) getPluginTable() string {
116
116
strings .Repeat ("-" , maxProjectVersionLength + 2 ))
117
117
118
118
sort .Strings (pluginKeys )
119
- for i , pluginKey := range pluginKeys {
120
- supportedProjectVersions := projectVersions [i ]
119
+ for _ , pluginKey := range pluginKeys {
120
+ supportedProjectVersions := projectVersions [pluginKey ]
121
121
lines = append (lines , fmt .Sprintf (" %[1]*[2]s | %[3]*[4]s" ,
122
122
maxPluginKeyLength , pluginKey , maxProjectVersionLength , supportedProjectVersions ))
123
123
}
0 commit comments