Recursive directory globbing via **
for Go's io/fs.
func main() {
// get file system for this repository
wd, _ := os.Getwd()
fsys := os.DirFS(wd)
// get all yml files
matches, _ := fsdoublestar.Glob(fsys, "**/*.yml")
// print matches
fmt.Println(matches)
// Output: [.github/workflows/ci.yml .github/.golangci.yml]
}
This repository is based on Bob Matcuk's great doublestar package.