(key string)
| 75 | } |
| 76 | |
| 77 | func (f *FileCache) open(key string) (afero.File, bool, error) { |
| 78 | fileName := f.getFileName(key) |
| 79 | file, err := f.fs.Open(fileName) |
| 80 | if err != nil { |
| 81 | if errors.Is(err, os.ErrNotExist) { |
| 82 | return nil, false, nil |
| 83 | } |
| 84 | return nil, false, err |
| 85 | } |
| 86 | |
| 87 | return file, true, nil |
| 88 | } |
| 89 | |
| 90 | // getScopedLocks pull lock from the map if found or create a new one |
| 91 | func (f *FileCache) getScopedLocks(key string) (lock sync.Locker) { |
no test coverage detected