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

Method Close

diode/diode.go:84–91  ·  view source on GitHub ↗

Close releases the diode poller and call Close on the wrapped writer if io.Closer is implemented.

()

Source from the content-addressed store, hash-verified

82// Close releases the diode poller and call Close on the wrapped writer if
83// io.Closer is implemented.
84func (dw Writer) Close() error {
85 dw.c()
86 <-dw.done
87 if w, ok := dw.w.(io.Closer); ok {
88 return w.Close()
89 }
90 return nil
91}
92
93func (dw Writer) poll() {
94 defer close(dw.done)

Callers 5

TestNewWriterFunction · 0.95
TestCloseFunction · 0.95
TestFatalFunction · 0.95
BenchmarkFunction · 0.95
ExampleNewWriterFunction · 0.95

Calls

no outgoing calls

Tested by 5

TestNewWriterFunction · 0.76
TestCloseFunction · 0.76
TestFatalFunction · 0.76
BenchmarkFunction · 0.76
ExampleNewWriterFunction · 0.76