MCPcopy
hub / github.com/github/github-mcp-server / Read

Method Read

pkg/log/io.go:29–38  ·  view source on GitHub ↗

Read reads data from the underlying io.Reader and logs it.

(p []byte)

Source from the content-addressed store, hash-verified

27
28// Read reads data from the underlying io.Reader and logs it.
29func (l *IOLogger) Read(p []byte) (n int, err error) {
30 if l.reader == nil {
31 return 0, io.EOF
32 }
33 n, err = l.reader.Read(p)
34 if n > 0 {
35 l.logger.Info("[stdin]: received bytes", "count", n, "data", string(p[:n]))
36 }
37 return n, err
38}
39
40// Write writes data to the underlying io.Writer and logs it.
41func (l *IOLogger) Write(p []byte) (n int, err error) {

Callers 3

TestLoggedReadWriterFunction · 0.95
randomStateFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestLoggedReadWriterFunction · 0.76