Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Walk ¶
func Walk(c *config.Config, cexts []config.Configurer, wf WalkFunc)
Walk traverses the directory tree rooted at c.RepoRoot in depth-first order.
Walk calls the Configure method on each configuration extension in cexts in each directory in pre-order, whether a build file is present in the directory or not.
Walk calls the callback wf in post-order.
Types ¶
type WalkFunc ¶
type WalkFunc func(dir, rel string, c *config.Config, update bool, f *rule.File, subdirs, regularFiles, genFiles []string)
WalkFunc is a callback called by Walk in each visited directory.
dir is the absolute file system path to the directory being visited.
rel is the relative slash-separated path to the directory from the repository root. Will be "" for the repository root directory itself.
c is the configuration for the current directory. This may have been modified by directives in the directory's build file.
update is true when the build file may be updated.
f is the existing build file in the directory. Will be nil if there was no file.
subdirs is a list of base names of subdirectories within dir, not including excluded files.
regularFiles is a list of base names of regular files within dir, not including excluded files.
genFiles is a list of names of generated files, found by reading "out" and "outs" attributes of rules in f.