Plugins: Tidy up CLI code (#67813)
* more tidying * move some things around * more tidying * fix linter
This commit is contained in:
@@ -127,7 +127,7 @@ func osAndArchString() string {
|
||||
return osString + "-" + arch
|
||||
}
|
||||
|
||||
func supportsCurrentArch(version *models.Version) bool {
|
||||
func supportsCurrentArch(version models.Version) bool {
|
||||
if version.Arch == nil {
|
||||
return true
|
||||
}
|
||||
@@ -139,10 +139,10 @@ func supportsCurrentArch(version *models.Version) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func latestSupportedVersion(plugin *models.Plugin) *models.Version {
|
||||
func latestSupportedVersion(plugin models.Plugin) *models.Version {
|
||||
for _, v := range plugin.Versions {
|
||||
ver := v
|
||||
if supportsCurrentArch(&ver) {
|
||||
if supportsCurrentArch(ver) {
|
||||
return &ver
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user