MCPcopy Create free account
hub / github.com/aws/smithy-go / Read

Method Read

testing/reader.go:19–30  ·  view source on GitHub ↗

Read populates the passed in byte slice with the value the ByteLoop was created with. Returns the size of bytes written. If the reader is closed, io.EOF will be returned.

(p []byte)

Source from the content-addressed store, hash-verified

17// created with. Returns the size of bytes written. If the reader is closed,
18// io.EOF will be returned.
19func (l *ByteLoop) Read(p []byte) (size int, err error) {
20 l.mu.RLock()
21 defer l.mu.RUnlock()
22 if l.closed {
23 return 0, io.EOF
24 }
25
26 for i := 0; i < len(p); i++ {
27 p[i] = l.value
28 }
29 return len(p), nil
30}
31
32// Close closes the ByteLoop, and prevents any further reading.
33func (l *ByteLoop) Close() error {

Callers 1

TestDecode_FuzzFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestDecode_FuzzFunction · 0.36