We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4de9c7c commit 93842d0Copy full SHA for 93842d0
internal/verifier/recheck.go
@@ -2,6 +2,7 @@ package verifier
2
3
import (
4
"context"
5
+ "fmt"
6
7
"github.com/10gen/migration-verifier/internal/retry"
8
"github.com/10gen/migration-verifier/internal/types"
@@ -63,6 +64,10 @@ func (verifier *Verifier) InsertFailedCompareRecheckDocs(
63
64
// This will split the given slice into *roughly* the given number of chunks.
65
// It may end up being more or fewer, but it should be pretty close.
66
func splitToChunks[T any, Slice ~[]T](elements Slice, numChunks int) []Slice {
67
+ if numChunks < 1 {
68
+ panic(fmt.Sprintf("numChunks (%v) should be >=1", numChunks))
69
+ }
70
+
71
elsPerChunk := len(elements) / numChunks
72
73
if elsPerChunk == 0 {
0 commit comments