MCPcopy
hub / github.com/puma/puma-dev / WriteTo

Method WriteTo

linebuffer/linebuffer.go:74–87  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

72}
73
74func (lb *LineBuffer) WriteTo(w io.Writer) (int64, error) {
75 var tot int64
76
77 err := lb.Do(func(l string) error {
78 n, err := w.Write([]byte(l))
79 if err != nil {
80 return err
81 }
82 tot += int64(n)
83 return nil
84 })
85
86 return tot, err
87}

Callers 1

TestLineBufferFunction · 0.95

Calls 1

DoMethod · 0.95

Tested by 1

TestLineBufferFunction · 0.76