fresh
fresh copied to clipboard
optimize by swapping Walk for WalkDir
Go 1.16 added filepath.WalkDir alongside filepath.Walk for performance reasons (see https://github.com/golang/go/issues/42027). The WalkDir method skips files and is Walk is more efficient than Walk by avoiding to call os.Lstat on every visited file or directory. @gravityblast Could you review this?