NewStreamWriter creates a StreamWriter that calls onOutput for each line.
(onOutput func(string))
| 259 | |
| 260 | // NewStreamWriter creates a StreamWriter that calls onOutput for each line. |
| 261 | func NewStreamWriter(onOutput func(string)) *StreamWriter { |
| 262 | return &StreamWriter{onOutput: onOutput} |
| 263 | } |
| 264 | |
| 265 | func (sw *StreamWriter) Write(p []byte) (int, error) { |
| 266 | sw.mu.Lock() |
no outgoing calls