Skip to content

Conversation

@keegancsmith
Copy link
Member

WalkDir was introduced in go1.16 suits our use case while being more efficient.

Test Plan: go test

WalkDir was introduced in go1.16 suits our use case while being more
efficient.

Test Plan: go test
@keegancsmith keegancsmith requested a review from cbart February 16, 2023 14:04
}

err = filepath.Walk(root, func(path string, fi os.FileInfo, fileErr error) error {
err = filepath.WalkDir(root, func(path string, fi fs.DirEntry, fileErr error) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you still need the if !fi.IsDir() below then?

Copy link
Member Author

@keegancsmith keegancsmith Feb 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes walkdir still goes over regular files.

@keegancsmith keegancsmith enabled auto-merge (squash) February 23, 2023 06:16
@keegancsmith keegancsmith merged commit f7f5b1d into main Feb 23, 2023
@keegancsmith keegancsmith deleted the k/walkdir branch February 23, 2023 06:19
scjohns pushed a commit that referenced this pull request Apr 24, 2023
WalkDir was introduced in go1.16 suits our use case while being more
efficient.

Test Plan: go test
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.

3 participants