Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use os.ReadDir for lightweight directory reading #7

Merged
merged 1 commit into from
Dec 11, 2021
Merged

refactor: use os.ReadDir for lightweight directory reading #7

merged 1 commit into from
Dec 11, 2021

Conversation

Juneezee
Copy link
Contributor

os.ReadDir is a more efficient implementation than ioutil.ReadDir as stated here https://pkg.go.dev/io/ioutil#ReadDir.

Note: os.ReadDir was added in Go 1.16 as part of the deprecation of ioutil package. You can read the proposal here golang/go#41467

Reference: golang/go#41467
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@antonmedv antonmedv merged commit 58c042e into antonmedv:master Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants