powerwalk
powerwalk copied to clipboard
Implement `SkipDir` in powerwalk
Simple implementation of SkipDir function.
Addresses #1
I just realized the issue was related to original Walk from standard library. Oh well...
But maybe it could be useful.
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?