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.
2 parents 15703e6 + 080e15a commit bd2bf65Copy full SHA for bd2bf65
utils/utils.go
@@ -30,7 +30,12 @@ func Timed(start time.Time, callback func(elapsed time.Duration)) {
30
}
31
32
// BatchSliceOfStrings groups the given keys into chunks of size count and streams them into a returned channel.
33
+// Panics if count is less than or equal to zero.
34
func BatchSliceOfStrings(ctx context.Context, keys []string, count int) <-chan []string {
35
+ if count <= 0 {
36
+ panic("chunk size must be greater than zero")
37
+ }
38
+
39
batches := make(chan []string)
40
41
go func() {
0 commit comments