Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed Jun 17, 2024
1 parent ce3c838 commit e5019fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/batch/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e5019fa

Please sign in to comment.