MCPcopy Create free account
hub / github.com/chain/txvm / Read

Method Read

cmd/hex/main.go:40–47  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

38}
39
40func (r *encodeReader) Read(p []byte) (int, error) {
41 if len(p)%2 == 1 {
42 p = p[:len(p)-1]
43 }
44 h := p[len(p)/2:]
45 n, err := r.r.Read(h)
46 return hex.Encode(p, h[:n]), err
47}
48
49type splitLineReader struct {
50 r io.Reader

Callers 3

ReadMethod · 0.45
ReadMethod · 0.45
ReadMethod · 0.45

Calls 1

EncodeMethod · 0.80

Tested by

no test coverage detected