HNHacker News
TopNewBestAskShowJobs

italicmew123

2 karma · joined February 9, 2024

submissionscomments
italicmew123··on Context Control in Go
Rule 3: Don’t store contexts - What about this: https://github.com/golang/go/blob/master/src/net/http/client...

  req = &Request{
    Method:   redirectMethod,
    Response: resp,
    URL:      u,
    Header:   make(Header),
    Host:     host,
    Cancel:   ireq.Cancel,
    ctx:      ireq.ctx,
   }
Isn't this considered storing the context?