- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for WriteOnClose (0.04 sec)
-
internal/ioutil/ioutil_test.go
} } func TestCloseOnWriter(t *testing.T) { writer := WriteOnClose(io.Discard) if writer.HasWritten() { t.Error("WriteOnCloser must not be marked as HasWritten") } writer.Write(nil) if !writer.HasWritten() { t.Error("WriteOnCloser must be marked as HasWritten") } writer = WriteOnClose(io.Discard) writer.Close() if !writer.HasWritten() {
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Tue Feb 18 16:25:55 UTC 2025 - 5.6K bytes - Viewed (0) -
internal/ioutil/ioutil.go
} return nil } // HasWritten returns true if at least one write operation was performed. func (w *WriteOnCloser) HasWritten() bool { return w.hasWritten } // WriteOnClose takes an io.Writer and returns an ioutil.WriteOnCloser. func WriteOnClose(w io.Writer) *WriteOnCloser { return &WriteOnCloser{w, false} } type ioret[V any] struct { val V err error }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Tue Feb 18 16:25:55 UTC 2025 - 11.1K bytes - Viewed (0) -
cmd/s3-zip-handlers.go
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } // s3zip does not allow ranges w.Header().Del(xhttp.AcceptRanges) setHeadGetRespHeaders(w, r.Form) httpWriter := xioutil.WriteOnClose(w) // Write object content to response body if _, err = xioutil.Copy(httpWriter, rc); err != nil { if !httpWriter.HasWritten() {
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 15.8K bytes - Viewed (0) -
cmd/object-handlers.go
setPartsCountHeaders(w, objInfo) } setHeadGetRespHeaders(w, r.Form) var iw io.Writer = w statusCodeWritten := false httpWriter := xioutil.WriteOnClose(iw) if rs != nil || opts.PartNumber > 0 { statusCodeWritten = true w.WriteHeader(http.StatusPartialContent) } // Write object content to response body
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 120.6K bytes - Viewed (0)