Re: [go-nuts] Proper Way of Defining a Custom Context

2017-05-08 Thread Peter Mogensen
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

Re: [go-nuts] Proper Way of Defining a Custom Context

2017-05-08 Thread dc0d
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

Re: [go-nuts] Proper Way of Defining a Custom Context

2017-05-07 Thread Peter Mogensen
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