Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve replacement from ioutil.ReadDir by io.ReadDir
This commit improves the code necessary for replacing the deprecated `ioutil.ReadDir` call by `io.ReadDir`. A single for loop is used to iterate over the dirEntries and if there is an error reading the FileInfo from a DirEntry, we log it and continue to the next dirEntry. This effectively adds more resilience to the original code that would not process any segment if the call to `ioutil.ReadDir` had failed.
- Loading branch information