()
| 130 | } |
| 131 | |
| 132 | func (v *VectorReader) close() error { |
| 133 | if v.hasClosed { |
| 134 | return nil |
| 135 | } |
| 136 | v.hasClosed = true |
| 137 | if v.activeReaders.Add(-1) <= 0 { |
| 138 | if closer, ok := v.readerAt.(io.Closer); ok { |
| 139 | return closer.Close() // coffee is for closers |
| 140 | } |
| 141 | } |
| 142 | return nil |
| 143 | } |
no test coverage detected