Skip to content

Instantly share code, notes, and snippets.

View kakaLQY's full-sized avatar
🎯
Focusing

Kaka kakaLQY

🎯
Focusing
View GitHub Profile
@kakaLQY
kakaLQY / testbatch_test.go
Last active February 6, 2023 10:33
Golang batch get from buffered channel with a maximum number.
package testbatch
import (
"testing"
"time"
)
func TestBatch(t *testing.T) {
bufCh := make(chan int, 20)
go func() {