I agree on the fact that passing a Context everywhere is impossible in some
cases - just think about the many APIs (from standard library and 3rd
parties) that do not accept a Context - and in some other cases very
complicated, requiring extensive refactoring.
I also agree with the
I agree. I’ve read the arguments against thread-local (or goroutine local
storage), and the passing of Context everywhere instead. It doesn’t make sense
to me.
Even a simple runtime.GetGoID() that returned a unique int would allow the
design of much simpler server software.
But I don’t think
Now i have the same problem as you, i need to record log id through a web
request, and pass the log id by httpContext, its look orderless for my
code, so sad!
On Thursday, February 25, 2016 at 1:59:11 AM UTC+8, Damian Turczyński wrote:
>
> Kevin
>
> I have in my opinion valid reason. I'm