MCPcopy
hub / github.com/wavetermdev/waveterm / Read

Method Read

cmd/test-streammanager/generator.go:22–40  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

20}
21
22func (g *TestDataGenerator) Read(p []byte) (n int, err error) {
23 if g.generated >= g.totalBytes {
24 return 0, io.EOF
25 }
26
27 remaining := g.totalBytes - g.generated
28 toRead := int64(len(p))
29 if toRead > remaining {
30 toRead = remaining
31 }
32
33 // Sequential pattern using base64 chars (0-63 cycling)
34 for i := int64(0); i < toRead; i++ {
35 p[i] = Base64Chars[(g.generated+i)%64]
36 }
37
38 g.generated += toRead
39 return int(toRead), nil
40}

Callers 7

WriteMethod · 0.45
tailLogFileFunction · 0.45
streamWriteToFileFunction · 0.45
stdinReadWatchFunction · 0.45
testShellWithCommandFunction · 0.45
testWshExecFunction · 0.45
testInteractiveShellFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected