Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds AsMap to iterate over .Files.Glob #159

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

terricain
Copy link
Contributor

So you can't use range over the response from .Files.Glob as it doesnt return a map/slice, so I've added a convenience function to return the underlying files map.

So

{{ range $path, $_ :=  (.Files.Glob  "**.yaml") -}}

becomes
{{ range $path, $_ := (.Files.Glob "**.yaml").AsMap -}}

@Nepo26 Nepo26 mentioned this pull request Jul 3, 2023
12 tasks
@Nepo26 Nepo26 added this to the General Cleanup milestone Jul 25, 2023
@norwoodj norwoodj merged commit 3b87f0a into norwoodj:master Nov 2, 2023
@terricain terricain deleted the files_asmap branch November 2, 2023 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants