Skip to content

Feature request: add file.Glob function #2305

@artemklevtsov

Description

@artemklevtsov

Hi,

It would be useful to read.Glob function in addition to file.Walk.

Example:

$ tree /tmp/foo
/tmp/foo
├── one.yaml
└── two.yaml
├── three.yaml
├── four.json
└── five.json

$ gomplate -i '{{ range file.Glob "/tmp/*.yaml" }}{{.}}{{"\n"}}{{end}}'
/tmp/one.yaml
/tmp/two.yaml
/tmp/three.yaml

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions