MCPcopy Create free account
hub / github.com/bodgit/sevenzip / ByteReadCloser

Function ByteReadCloser

internal/util/reader.go:62–68  ·  view source on GitHub ↗

ByteReadCloser returns a ReadCloser either by returning the io.ReadCloser r if it implements the interface, or wrapping it with a ReadByte method.

(r io.ReadCloser)

Source from the content-addressed store, hash-verified

60// ByteReadCloser returns a ReadCloser either by returning the io.ReadCloser
61// r if it implements the interface, or wrapping it with a ReadByte method.
62func ByteReadCloser(r io.ReadCloser) ReadCloser {
63 if rc, ok := r.(ReadCloser); ok {
64 return rc
65 }
66
67 return &byteReadCloser{r}
68}

Callers 3

initMethod · 0.92
NewReaderFunction · 0.92
NewReaderFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…