File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -114,13 +114,14 @@ func outputDep(dep *result.LibraryDependencyStatus) string {
114
114
green := color .New (color .FgGreen )
115
115
red := color .New (color .FgRed )
116
116
yellow := color .New (color .FgYellow )
117
- if dep .VersionInstalled == "" {
117
+ switch dep .VersionInstalled {
118
+ case "" :
118
119
res += i18n .Tr ("%s must be installed." ,
119
120
red .Sprintf ("✕ %s %s" , dep .Name , dep .VersionRequired ))
120
- } else if dep .VersionInstalled == dep . VersionRequired {
121
+ case dep .VersionRequired :
121
122
res += i18n .Tr ("%s is already installed." ,
122
123
green .Sprintf ("✓ %s %s" , dep .Name , dep .VersionRequired ))
123
- } else {
124
+ default :
124
125
res += i18n .Tr ("%[1]s is required but %[2]s is currently installed." ,
125
126
yellow .Sprintf ("✕ %s %s" , dep .Name , dep .VersionRequired ),
126
127
yellow .Sprintf ("%s" , dep .VersionInstalled ))
You can’t perform that action at this time.
0 commit comments