CacheCloser is a cache wrapper used to close all acquired files. This is a more simple interface to use if opening multiple files at once.
| 13 | // CacheCloser is a cache wrapper used to close all acquired files. |
| 14 | // This is a more simple interface to use if opening multiple files at once. |
| 15 | type CacheCloser struct { |
| 16 | cache FileAcquirer |
| 17 | |
| 18 | closers []func() |
| 19 | mu sync.Mutex |
| 20 | } |
| 21 | |
| 22 | func NewCacheCloser(cache FileAcquirer) *CacheCloser { |
| 23 | return &CacheCloser{ |
nothing calls this directly
no outgoing calls
no test coverage detected