No, just get rid of the clients map, and instead, just create a single global client. Http Clients are designed to be used by multiple goroutines.
On Sun, May 27, 2018 at 4:33 PM, Tamás Gulácsi <tgulacs...@gmail.com> wrote: > Map is not concurrency safe, you have to synchronize access. For example > with a sync.Mutex. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "golang-nuts" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/golang-nuts/uDOBUBNIz3o/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.