MCPcopy Create free account
hub / github.com/devld/go-drive / GetReadCloser

Function GetReadCloser

script/object_io.go:55–63  ·  view source on GitHub ↗
(v any)

Source from the content-addressed store, hash-verified

53}
54
55func GetReadCloser(v any) io.ReadCloser {
56 switch v := v.(type) {
57 case ReadCloser:
58 return v.r
59 case TempFile:
60 return &tempFileCloser{v.f, v}
61 }
62 return nil
63}
64
65// DetachReadCloser returns the underlying io.ReadCloser of a script reader
66// value and detaches it from the VM's disposables. After detaching, the reader

Callers 2

DetachReadCloserFunction · 0.85
DisposeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected