Example code (note that it won’t actually execute in the playground since it’s making network calls):
My assumption was that this code is a potential data race and requires additional synchronization on t. net/http/httptrace in particular says: "Functions may be called concurrently from different goroutines and some may be called after the request has completed or failed.”
Is there some additional synchronization guarantee provided by eg. client.Do() that I’m missing and that makes this safe, or is the fact that it doesn’t trip a race happenstance?