MCPcopy
hub / github.com/wal-g/wal-g / Read

Method Read

internal/compression_structures_test.go:125–136  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

123}
124
125func (er *DelayedErrorReader) Read(p []byte) (int, error) {
126 x, err := er.underlying.Read(p)
127 if err != nil {
128 return 0, err
129 }
130 er.n -= x
131 if er.n < 0 {
132 return 0, errors.New("mock reader: read error")
133 } else {
134 return x, nil
135 }
136}
137
138func testCompressAndEncryptErrorPropagation(compressor compression.Compressor, t *testing.T) {
139 L := 1 << 20

Callers

nothing calls this directly

Calls 1

ReadMethod · 0.65

Tested by

no test coverage detected