()
| 21 | } |
| 22 | |
| 23 | func (r *appResolver) refresh() error { |
| 24 | r.mutex.Lock() |
| 25 | defer r.mutex.Unlock() |
| 26 | idDirs, err := os.ReadDir(appsPath) |
| 27 | if err != nil { |
| 28 | return errors.WithMessage(err, "read apps dir") |
| 29 | } |
| 30 | idDirs = util.RemoveHiddenDirs(idDirs) |
| 31 | for _, idDir := range idDirs { |
| 32 | id := idDir.Name() |
| 33 | r.idToAppMap[id] = loadApp(id) |
| 34 | } |
| 35 | return nil |
| 36 | } |
| 37 | |
| 38 | func (r *appResolver) GetAll() ([]App, error) { |
| 39 | r.mutex.Lock() |
no test coverage detected