package sync import ( "context" "testing" "time" ) func TestWaitGroup(t *testing.T) { wg := NewWaitGroup() _ = t wg.Add(1) ctx, cancel := context.WithTimeout(context.TODO(), 1*time.Second) defer cancel() wg.WaitContext(ctx) }