why is wait group necessary in streaming post request to elasticsearch

34 views
Skip to first unread message

Alexander Mills

unread,
Sep 10, 2020, 1:49:32 PM9/10/20
to golang-nuts
I am trying to figure out why the wg is seemingly necessary as part of this code to stream JSON to a post request to ElasticSearch:

https://gist.github.com/ORESoftware/06341057ca39e1b2a47dc8a8e4e4b55f

Any tips appreciated. If the waitgroup is not used, it doesn't appear to wait until the full request body is received? Not sure.
Reply all
Reply to author
Forward
0 new messages