build: go 1.24

We were running behind and there were quite some deprecations to update.
This was mostly in the upstream copy/pasta package but seems quite
minimal.
This commit is contained in:
2025-03-16 12:04:32 +01:00
parent a2b678caf6
commit 1723025fbf
822 changed files with 25433 additions and 197407 deletions

View File

@ -20,7 +20,7 @@ func max(a, b int) int { //nolint:predeclared
return b
}
// min returns the greater of two integers.
// min returns the smaller of two integers.
func min(a, b int) int { //nolint:predeclared
if a < b {
return a
@ -45,20 +45,8 @@ func median(n []int) int {
return 0
}
if len(n)%2 == 0 {
h := len(n) / 2 //nolint:gomnd
return (n[h-1] + n[h]) / 2 //nolint:gomnd
h := len(n) / 2 //nolint:mnd
return (n[h-1] + n[h]) / 2 //nolint:mnd
}
return n[len(n)/2]
}
// largest returns the largest element and it's index from a slice of integers.
func largest(n []int) (int, int) { //nolint:unparam
var largest, index int
for i, e := range n {
if n[i] > n[index] {
largest = e
index = i
}
}
return index, largest
}