Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
Example ¶
package main import ( "fmt" "github.com/floatdrop/batchan" ) func main() { input := make(chan string, 5) batches := batchan.New(input, 3) go func() { inputs := []string{"A", "B", "C", "D", "E"} for _, v := range inputs { input <- v } close(input) }() for v := range batches { fmt.Println("Got:", v) } }
Output: Got: [A B C] Got: [D E]
func WithSplitFunc ¶ added in v0.0.2
func WithTimeout ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.