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

Method addLine

pkg/utilds/readerlinebuffer.go:76–87  ·  view source on GitHub ↗
(line string)

Source from the content-addressed store, hash-verified

74}
75
76func (rlb *ReaderLineBuffer) addLine(line string) {
77 rlb.lock.Lock()
78 defer rlb.lock.Unlock()
79
80 rlb.totalLineCount++
81
82 if len(rlb.lines) >= rlb.maxLines {
83 rlb.lines = append(rlb.lines[1:], line)
84 } else {
85 rlb.lines = append(rlb.lines, line)
86 }
87}
88
89func (rlb *ReaderLineBuffer) GetLines() []string {
90 rlb.lock.Lock()

Callers 1

ReadLineMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected