On 2017-05-08 11:55, dc0d wrote:
So just Value(...) then? Of-course I've implemented an adapter with no
extra fields, just with some methods to work with Value(...).
Yeah...that would be my best advice - unless someone else can
demonstrate a clean way to extend context.Context.
/Peter
--
So just Value(...) then? Of-course I've implemented an adapter with no
extra fields, just with some methods to work with Value(...).
On Sunday, May 7, 2017 at 2:41:31 PM UTC+4:30, Peter Mogensen wrote:
>
>
>
> On 2017-05-07 11:58, dc0d wrote:
> > What's the proper way of defining a custom contex
On 2017-05-07 11:58, dc0d wrote:
What's the proper way of defining a custom context?
Is it enough to wrap the methods of parent `context.Context`?
I did some experiments trying to extend the context.Context interface.
One quickly runs into endless troubles due to the reliance on global
funct
What's the proper way of defining a custom context?
Is it enough to wrap the methods of parent `context.Context`? Is it fine to
add fields and methods (we can type-assert later on, down the chain)?
Or one should just use the `WithValue` and stores everything inside the
context and handle them u