build: modernize with "go fix -minmax": use min and max builtins

This commit is contained in:
Nick Craig-Wood
2026-08-21 12:23:31 +01:00
parent bfd0e3f3c2
commit b5bea683c5
4 changed files with 12 additions and 26 deletions
+1 -4
View File
@@ -126,10 +126,7 @@ func CheckContentRange(resp *http.Response, options []fs.OpenOption, size int64)
expectedEnd = rangeSize - 1
}
} else if rangeSize >= 0 {
expectedStart = rangeSize - requested.End
if expectedStart < 0 {
expectedStart = 0
}
expectedStart = max(rangeSize-requested.End, 0)
expectedEnd = rangeSize - 1
}