MCPcopy Create free account
hub / github.com/diillson/chatcli / NewStreamWriter

Function NewStreamWriter

pkg/coder/engine/engine.go:261–263  ·  view source on GitHub ↗

NewStreamWriter creates a StreamWriter that calls onOutput for each line.

(onOutput func(string))

Source from the content-addressed store, hash-verified

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

Callers 15

ExecuteWithStreamMethod · 0.92
ExecuteWithStreamMethod · 0.92
ExecuteWithStreamMethod · 0.92
ExecuteWithStreamMethod · 0.92
smartCommitScriptFunction · 0.92
reviewChangesScriptFunction · 0.92
diffReviewScriptFunction · 0.92
scanLintScriptFunction · 0.92
auditDepsScriptFunction · 0.92
updateDepsScriptFunction · 0.92
whyDepScriptFunction · 0.92
runCoverageScriptFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestStreamWriterFunction · 0.68
TestStreamWriterCRLFFunction · 0.68