MCPcopy
hub / github.com/rs/zerolog / Write

Method Write

hlog/internal/mutil/writer_proxy.go:66–78  ·  view source on GitHub ↗
(buf []byte)

Source from the content-addressed store, hash-verified

64}
65
66func (b *basicWriter) Write(buf []byte) (int, error) {
67 b.WriteHeader(http.StatusOK)
68 n, err := b.ResponseWriter.Write(buf)
69 if b.tee != nil {
70 _, err2 := b.tee.Write(buf[:n])
71 // Prefer errors generated by the proxied writer.
72 if err == nil {
73 err = err2
74 }
75 }
76 b.bytes += n
77 return n, err
78}
79
80func (b *basicWriter) maybeWriteHeader() {
81 if !b.wroteHeader {

Callers

nothing calls this directly

Calls 1

WriteHeaderMethod · 0.95

Tested by

no test coverage detected