Skip to content

Commit cc97c3a

Browse files
committed
fix comments
Signed-off-by: Wantong Jiang <[email protected]>
1 parent 11f6260 commit cc97c3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/controllers/updaterun/initialization.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,11 @@ func (r *Reconciler) computeRunStageStatus(
388388
}
389389
}
390390
// Sort the missing clusters by their names to generate a stable error message.
391-
sort.StringSlice(missingClusters).Sort()
391+
sort.Strings(missingClusters)
392392
missingClustersStr := strings.Join(missingClusters, ", ")
393393
klog.ErrorS(missingErr, "Clusters are missing in any stage", "clusters", missingClustersStr, "clusterStagedUpdateStrategy", updateStrategyName, "clusterStagedUpdateRun", updateRunRef)
394394
// no more retries here.
395-
return fmt.Errorf("%w: %s", errInitializedFailed, fmt.Sprintf("%s: %s", missingErr.Error(), missingClustersStr))
395+
return fmt.Errorf("%w: %s: %s", errInitializedFailed, missingErr.Error(), missingClustersStr)
396396
}
397397
return nil
398398
}

0 commit comments

Comments
 (0)