api/types/versions: rename max/min as it collides with go1.21 builtin

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 318b3d4fe5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-08-26 19:38:47 +02:00
parent 0702941de6
commit 334719141c
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -16,11 +16,11 @@ func compare(v1, v2 string) int {
otherTab = strings.Split(v2, ".")
)
max := len(currTab)
if len(otherTab) > max {
max = len(otherTab)
maxVer := len(currTab)
if len(otherTab) > maxVer {
maxVer = len(otherTab)
}
for i := 0; i < max; i++ {
for i := 0; i < maxVer; i++ {
var currInt, otherInt int
if len(currTab) > i {