MCPcopy
hub / github.com/tsuru/tsuru / Write

Method Write

api/shell.go:54–69  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

52}
53
54func (l *cmdLogger) Write(p []byte) (n int, err error) {
55 n, err = l.base.Write(p)
56 l.Lock()
57 defer l.Unlock()
58 if l.addComplete {
59 for _, c := range string(p) {
60 if unicode.IsPrint(c) {
61 l.term.Write([]byte(string(c)))
62 }
63 }
64 if len(p) == 0 || p[len(p)-1] != '\a' {
65 l.addComplete = false
66 }
67 }
68 return
69}
70
71func (l *cmdLogger) Close() error {
72 return l.base.Close()

Callers 15

TestServiceProxyMethod · 0.45
TestServiceProxyPostMethod · 0.45
TestServiceProxyErrorMethod · 0.45
TestAddLogsHandlerMethod · 0.45
BenchmarkScanLogsMethod · 0.45
createTempFromDataFunction · 0.45
replaceFileContentFunction · 0.45
jobTriggerFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestServiceProxyMethod · 0.36
TestServiceProxyPostMethod · 0.36
TestServiceProxyErrorMethod · 0.36
TestAddLogsHandlerMethod · 0.36
BenchmarkScanLogsMethod · 0.36
createTempFromDataFunction · 0.36
replaceFileContentFunction · 0.36
SetUpTestMethod · 0.36