MCPcopy
hub / github.com/perkeep/perkeep / Write

Method Write

pkg/test/test.go:54–67  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

52}
53
54func (w twriter) Write(p []byte) (n int, err error) {
55 if len(w.quietPhrases) > 0 {
56 s := string(p)
57 for _, phrase := range w.quietPhrases {
58 if strings.Contains(s, phrase) {
59 return len(p), nil
60 }
61 }
62 }
63 if w.t != nil {
64 w.t.Log(strings.TrimSuffix(string(p), "\n"))
65 }
66 return len(p), nil
67}
68
69// NewLogger returns a logger that logs to t with the given prefix.
70//

Callers 15

DiffFunction · 0.45
TestWebsocketQueryFunction · 0.45
createTestFileFunction · 0.45
TestCamgetFileFunction · 0.45
VerifySignatureMethod · 0.45
handleSignMethod · 0.45
awaitQuitKeyFunction · 0.45
RunCommandMethod · 0.45
RunCommandMethod · 0.45
RunCommandMethod · 0.45
RunCommandMethod · 0.45
marshalBinaryMethod · 0.45

Calls 2

ContainsMethod · 0.80
LogMethod · 0.80

Tested by 3

TestWebsocketQueryFunction · 0.36
createTestFileFunction · 0.36
TestCamgetFileFunction · 0.36