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

Method Write

pkg/log/io.go:41–47  ·  view source on GitHub ↗

Write writes data to the underlying io.Writer and logs it.

(p []byte)

Source from the content-addressed store, hash-verified

39
40// Write writes data to the underlying io.Writer and logs it.
41func (l *IOLogger) Write(p []byte) (n int, err error) {
42 if l.writer == nil {
43 return 0, io.ErrClosedPipe
44 }
45 l.logger.Info("[stdout]: sending bytes", "count", len(p), "data", string(p))
46 return l.writer.Write(p)
47}
48
49func (l *IOLogger) Close() error {
50 var errReader, errWriter error

Callers 5

TestLoggedReadWriterFunction · 0.95
ServeHTTPMethod · 0.45
DumpTranslationKeyMapFunction · 0.45
NewMockedHTTPClientFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestLoggedReadWriterFunction · 0.76