helm-docs icon indicating copy to clipboard operation
helm-docs copied to clipboard

Adds AsMap to iterate over .Files.Glob

Open terricain opened this issue 3 years ago • 0 comments

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 -}}

terricain avatar Jul 18 '22 14:07 terricain