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

Implement SkipDir in powerwalk #4

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

piotrrojek
Copy link

Simple implementation of SkipDir function.

Addresses #1

@piotrrojek
Copy link
Author

I just realized the issue was related to original Walk from standard library. Oh well...
But maybe it could be useful.

With that we should avoid edge cases failures.
@matryer
Copy link
Member

matryer commented Feb 26, 2016

Ah nice. The spec for filepath.Walk asks that the WalkFunc returns an error (filepath.SkipDir) in order to skip the directory. Since walking occurs concurrently, this cannot be done, so I like this approach. Perhaps a SkipDir(path string, info os.FileInfo) bool func would be nice to let the calling code decide this at runtime, rather than having to know up-front?

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.

None yet

3 participants