Documentation ¶
Overview ¶
Package traverse provides utilities to traverse directories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Traverse ¶
func Traverse(bfs billy.Filesystem, base string, fun FuncTraverse) error
Traverse traverses the given directory and calls the given function with each file.
func Walk ¶
Walk walks the file tree rooted at root, calling fn for each file or directory in the tree, including root. All errors that arise visiting files and directories are filtered by fn: see the WalkFunc documentation for details.
The files are walked in lexical order, which makes the output deterministic but requires Walk to read an entire directory into memory before proceeding to walk that directory. Walk does not follow symbolic links.
Function adapted from https://github.com/golang/go/blob/3b770f2ccb1fa6fecc22ea822a19447b10b70c5c/src/path/filepath/path.go#L500
func YamlDockerfiles ¶
YamlDockerfiles traverses all yaml/yml in the given directory and calls the given function with each workflow.
Types ¶
type FuncTraverse ¶
FuncTraverse is a function that gets called with each file in a directory.