The Go CDK stores a Context in a struct while performing I/O:
https://pkg.go.dev/gocloud.dev/blob#Bucket.NewWriter
It could be argued that this is done for compatibility with the io.Reader
and io.Writer interfaces. However, I think this pattern, used sparingly, is
suitable for API interactions
Er, lifetime of the struct *
On Tue, Jan 12, 2021 at 8:11 AM Jean de Klerk 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,