@@ -34,10 +34,7 @@ func main() {
3434
3535 ctx := context .Background ()
3636
37- results , err := checkVersions (ctx , * filterChain , * concurrency , * timeout )
38- if err != nil {
39- log .Fatalf ("version check failed: %v" , err )
40- }
37+ results := checkVersions (ctx , * filterChain , * concurrency , * timeout )
4138
4239 printReport (results )
4340
@@ -70,7 +67,7 @@ type versionResult struct {
7067
7168func checkVersions (
7269 ctx context.Context , filterChain string , concurrency int , timeout time.Duration ,
73- ) ( []versionResult , error ) {
70+ ) []versionResult {
7471 all := adapters .All ()
7572
7673 type workItem struct {
@@ -147,7 +144,7 @@ func checkVersions(
147144
148145 wg .Wait ()
149146 sort .Slice (results , func (i , j int ) bool { return results [i ].Chain < results [j ].Chain })
150- return results , nil
147+ return results
151148}
152149
153150func filterNewer (results []versionResult ) []versionResult {
@@ -540,7 +537,7 @@ func writeVersionsGen(path string, images map[nodesv1alpha1.Chain]map[string]str
540537 return keys [i ] < keys [j ]
541538 })
542539
543- var clientEntries []clientEntry
540+ clientEntries := make ( []clientEntry , 0 , len ( keys ))
544541 for _ , k := range keys {
545542 clientEntries = append (clientEntries , clientEntry {Key : k , Image : clients [k ]})
546543 }
0 commit comments