mirror of
https://github.com/containerd/containerd.git
synced 2026-08-08 17:11:15 +00:00
plugins: modernize: rangeint
go install golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest
modernize -rangeint -fix ./...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -317,7 +317,7 @@ type checker interface {
|
||||
func generateBlobs(t checker, nblobs, maxsize int64) map[digest.Digest][]byte {
|
||||
blobs := map[digest.Digest][]byte{}
|
||||
|
||||
for i := int64(0); i < nblobs; i++ {
|
||||
for range nblobs {
|
||||
p := make([]byte, randutil.Int63n(maxsize))
|
||||
|
||||
if _, err := rand.Read(p); err != nil {
|
||||
|
||||
@@ -85,7 +85,7 @@ func TestDeletionThreshold(t *testing.T) {
|
||||
|
||||
// Increment deletion count 5, checking GC hasn't run in
|
||||
// between each call
|
||||
for i := 0; i < 5; i++ {
|
||||
for range 5 {
|
||||
time.Sleep(time.Millisecond)
|
||||
if c := tc.runCount(); c != 0 {
|
||||
t.Fatalf("GC ran unexpectedly")
|
||||
|
||||
Reference in New Issue
Block a user