Er, lifetime of the struct * On Tue, Jan 12, 2021 at 8:11 AM Jean de Klerk <dekl...@google.com> wrote:
> Hi all, > > I'm looking into how contexts are used, and wondering: does anybody know > of an idiomatic use of context on a struct for the sake of a one-shot? > > (a one-shot being some struct that gets used once, like an RPC or http > request) > > For example, http.Request has a context on its struct. But, I think the > context exists there for backwards compatibility reasons. > > I'm looking for a struct that has context on it specifically because the > context is scoped to the lifetime of the request. > > Thanks! > Jean > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CADn7dfJcBBe2A4fvwFJ3axGhwmKh1GwgJoS19GZ4AVfPs6jqpA%40mail.gmail.com.