Merge pull request #5270 from prajwalbharadwajbm/master

build: improve GoVersion comparison logic
This commit is contained in:
Michael Eischer 2025-03-22 12:05:40 +01:00 committed by GitHub
commit c405e9e748
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -298,19 +298,21 @@ func (v GoVersion) AtLeast(other GoVersion) bool {
return true
}
if v.Major > other.Major {
return true
}
if v.Major < other.Major {
return false
}
if v.Minor > other.Minor {
return true
}
if v.Minor < other.Minor {
return false
}
if v.Patch < other.Patch {
return false
}
return true
return v.Patch >= other.Patch
}
func (v GoVersion) String() string {