mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
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:
@@ -21,6 +21,7 @@ package bandwidth
|
||||
|
||||
import (
|
||||
"context"
|
||||
"slices"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -83,12 +84,7 @@ func SelectBuckets(buckets ...string) SelectionFunction {
|
||||
}
|
||||
}
|
||||
return func(bucket string) bool {
|
||||
for _, bkt := range buckets {
|
||||
if bkt == bucket {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
return slices.Contains(buckets, bucket)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,6 @@ func TestMonitor_GetReport(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
thr := bucketThrottle{
|
||||
|
||||
Reference in New Issue
Block a user