- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for WriteOnClose (0.1 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 5.5K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 10.9K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 15:31:51 UTC 2024 - 15.8K bytes - Viewed (0) -
cmd/object-handlers.go
setPartsCountHeaders(w, objInfo) } setHeadGetRespHeaders(w, r.Form) var iw io.Writer iw = 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 05 05:16:15 UTC 2024 - 117.4K bytes - Viewed (0)