diff --git a/lib/batch/batch.go b/lib/batch/batch.go index 4088817ca..3c8b6de82 100644 --- a/lib/batch/batch.go +++ b/lib/batch/batch.go @@ -2,8 +2,8 @@ package batch import "fmt" -// BySize takes a series of elements, encodes them, groups them into batches of bytes that sum to at most [maxSizeBytes], -// and then passes each of those batches to the [yield] function. +// BySize takes a series of elements [in], encodes them using [encode], groups them into batches of bytes that sum to at +// most [maxSizeBytes], and then passes each batch to the [yield] function. func BySize[T any](in []T, maxSizeBytes int, encode func(T) ([]byte, error), yield func([][]byte) error) error { var buffer [][]byte var currentSizeBytes int