1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
13 type bufThenWrite struct {
19 func (btw *bufThenWrite) SetWriter(w io.Writer) error {
21 defer btw.mtx.Unlock()
23 _, err := io.Copy(w, &btw.buf)
27 func (btw *bufThenWrite) Write(p []byte) (int, error) {
29 defer btw.mtx.Unlock()