Re: [go-nuts] why is wait group necessary here?

2020-09-10 Thread burak serdar
On Thu, Sep 10, 2020 at 4:43 PM Alexander Mills wrote: > > It was behaving strangely before adding the waitgroup, my script was > getting stuck Waitgroup is unnecessary. There's a few problems: when you detect an error you should stop writing, but the program "continue"s. You set the

Re: [go-nuts] why is wait group necessary here?

2020-09-10 Thread Alexander Mills
It was behaving strangely before adding the waitgroup, my script was getting stuck On Thu, Sep 10, 2020 at 11:14 AM burak serdar wrote: > > On Thu, Sep 10, 2020 at 11:46 AM Alexander Mills > wrote: > > > > I tried writing this http post request which streams the request body > > line-by-line

Re: [go-nuts] why is wait group necessary here?

2020-09-10 Thread burak serdar
On Thu, Sep 10, 2020 at 11:46 AM Alexander Mills wrote: > > I tried writing this http post request which streams the request body > line-by-line as JSON. > (This is for an ElasticSearch bulk api request, newline separate JSON in the > request body). I didn't think the waitgroup was necessary,

[go-nuts] why is wait group necessary here?

2020-09-10 Thread Alexander Mills
I tried writing this http post request which streams the request body line-by-line as JSON. (This is for an ElasticSearch bulk api request, newline separate JSON in the request body). I didn't think the waitgroup was necessary, but apparently the waitgroup is necessary. Does anyone know why? I