MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / run

Method run

pkg/wshutil/wshcmdreader.go:72–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70}
71
72func (b *PtyBuffer) run() {
73 defer close(b.MessageCh)
74 buf := make([]byte, 4096)
75 for {
76 n, err := b.InputReader.Read(buf)
77 b.processData(buf[:n])
78 if err == io.EOF {
79 b.setEOF()
80 return
81 }
82 if err != nil {
83 b.setErr(fmt.Errorf("error reading input: %w", err))
84 return
85 }
86 }
87}
88
89func (b *PtyBuffer) processData(data []byte) {
90 outputBuf := make([]byte, 0, len(data))

Callers 2

MakePtyBufferFunction · 0.95
renderMermaidFunction · 0.45

Calls 4

processDataMethod · 0.95
setEOFMethod · 0.95
setErrMethod · 0.95
ReadMethod · 0.45

Tested by

no test coverage detected