On Saturday, November 18, 2017 at 1:54:51 PM UTC-8, Axel Wagner wrote:
>
> Given that there should be exactly one call to context.Background per
> binary (in func main()), I don't understand the problem this is trying to
> solve. Similarly, context.TODO might be used, but should be used
> tempo
Given that there should be exactly one call to context.Background per
binary (in func main()), I don't understand the problem this is trying to
solve. Similarly, context.TODO might be used, but should be used
temporarily, as a migration tool, so it shouldn't matter that much.
(Regarding context.C,
So, context.Bg could be a value then? context.TODO could stay a function.
On Saturday, November 18, 2017 at 6:01:07 AM UTC-8, Sameer Ajmani wrote:
>
> Context.TODO and Background have different String values; see
> emptyCtx.String.
> On Fri, Nov 17, 2017 at 9:25 PM me via golang-nuts <
> golan...
Ah, thanks!
> On Nov 18, 2017, at 9:00 AM, Sameer Ajmani wrote:
>
> Context.TODO and Background have different String values; see emptyCtx.String.
> On Fri, Nov 17, 2017 at 9:25 PM me via golang-nuts
> mailto:golang-nuts@googlegroups.com>> wrote:
> I've found a hint. Apparently, both context.TO
Context.TODO and Background have different String values; see
emptyCtx.String.
On Fri, Nov 17, 2017 at 9:25 PM me via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> I've found a hint. Apparently, both context.TODO and context.Background
> share a common implementation but they need distinct
I've found a hint. Apparently, both context.TODO and context.Background
share a common implementation but they need distinct addresses.
See https://golang.org/src/context/context.go#L168
So they cannot be constants because then they would not have an address.
They cannot be variables because th