(v any)
| 53 | } |
| 54 | |
| 55 | func 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 |
no outgoing calls
no test coverage detected