Skip to content

Commit 72e7e28

Browse files
committed
Update assignment to fix linting error
1 parent 9c8c1e1 commit 72e7e28

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

cmd/sort.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,8 @@ func RunSort(cmd *cobra.Command, args []string) error {
6363
versions = filtered
6464
}
6565

66-
ascending := true
67-
// Sort versions
68-
if order == "descending" || order == "dsc" {
69-
// Sort in descending order
70-
ascending = false
71-
}
66+
ascending := order == "ascending" || order == "asc"
67+
7268
sort.SortVersions(semver.Collection(versions), ascending)
7369

7470
result := VersionsToStrings(versions)

0 commit comments

Comments
 (0)