Run modernize (#21546)

`go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...` executed.

`go generate ./...` ran afterwards to keep generated.
This commit is contained in:
Klaus Post
2025-08-29 04:39:48 +02:00
committed by GitHub
parent 3b7cb6512c
commit f0b91e5504
238 changed files with 913 additions and 1257 deletions

View File

@@ -180,10 +180,7 @@ func (api objectAPIHandlers) getObjectInArchiveFileHandler(ctx context.Context,
if file.UncompressedSize64 > 0 {
// There may be number of header bytes before the content.
// Reading 64K extra. This should more than cover name and any "extra" details.
end := file.Offset + int64(file.CompressedSize64) + 64<<10
if end > zipObjInfo.Size {
end = zipObjInfo.Size
}
end := min(file.Offset+int64(file.CompressedSize64)+64<<10, zipObjInfo.Size)
rs := &HTTPRangeSpec{Start: file.Offset, End: end}
gr, err := objectAPI.GetObjectNInfo(ctx, bucket, zipPath, rs, nil, opts)
if err != nil {