MCPcopy
hub / github.com/tinylib/msgp / flush

Method flush

msgp/write.go:166–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164}
165
166func (mw *Writer) flush() error {
167 if mw.wloc == 0 {
168 return nil
169 }
170 n, err := mw.w.Write(mw.buf[:mw.wloc])
171 if err != nil {
172 if n > 0 {
173 mw.wloc = copy(mw.buf, mw.buf[n:mw.wloc])
174 }
175 return err
176 }
177 mw.wloc = 0
178 return nil
179}
180
181// Flush flushes all of the buffered
182// data to the underlying writer.

Callers 12

WriteExtensionMethod · 0.95
WriteExtensionRawMethod · 0.95
FlushMethod · 0.95
requireMethod · 0.95
AppendMethod · 0.95
pushMethod · 0.95
prefix8Method · 0.95
prefix16Method · 0.95
prefix32Method · 0.95
prefix64Method · 0.95
WriteMethod · 0.95
writeStringMethod · 0.95

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected