io_glob
io_glob synchronously waits for dependencies, then returns a list of absolute paths matching a project-relative glob. Matches are sorted and may include files and directories. A pattern with no matches returns an empty list. Symbolic links may be followed within the project root; links that escape the project root return an error.
Patterns use / as the path separator on every platform and support doublestar (**) recursive matching, shell wildcards, character classes, and alternatives such as {go,mod}.
Arguments
| Argument | Required | Description |
|---|---|---|
glob | Yes | Project-relative glob string. |
deps | No | Dependencies to complete before finding matches. |
Example
load("@io@1", "io_glob")
sources = io_glob("src/**/*.go", deps=[generate_sources])