code: func NewWriter(ctx context.Context, w io.Writer) *ctxWriter {
  	if ctx == nil {
  		ctx = context.Background()
  	}
  	return &ctxWriter{ctx: ctx, w: w}
  }
docs: // NewWriter wraps a writer to make it respect given Context.
  // If there is a blocking write, the returned Writer will return
  // whenever the context is cancelled (the return values are n=0
  // and err=ctx.Err().)
  //
  // Note well: this wrapper DOES NOT ACTUALLY cancel the underlying
  // write-- there is no way to do that with the standard go io
  // interface. So the read and write _will_ happen or hang. So, use
  // this sparingly, make sure to cancel the read or write as necesary
  // (e.g. closing a connection whose context is up, etc.)
  //
  // Furthermore, in order to protect your memory from being read
  // _after_ you've cancelled the context, this io.Writer will
  // first make a **copy** of the buffer.