Skip to content

Commit 5c16f95

Browse files
committed
Simplify deps sorting
1 parent 43ba63f commit 5c16f95

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Diff for: cli/lib/check_deps.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,7 @@ func (dr checkDepResult) String() string {
8989
return deps[i].Name < deps[j].Name
9090
})
9191
sort.SliceStable(deps, func(i, j int) bool {
92-
if deps[i].VersionInstalled != "" && deps[j].VersionInstalled == "" {
93-
return true
94-
}
95-
return false
92+
return deps[i].VersionInstalled != "" && deps[j].VersionInstalled == ""
9693
})
9794

9895
for _, dep := range deps {
@@ -102,7 +99,6 @@ func (dr checkDepResult) String() string {
10299
}
103100

104101
func outputDep(dep *rpc.LibraryDependencyStatus) string {
105-
106102
res := ""
107103
green := color.New(color.FgGreen)
108104
red := color.New(color.FgRed)

0 commit comments

Comments
 (0)