Helm: feature request: Iterate line-by-line through a `{{.Files}}` object in a template

Created on 14 Nov 2016  ·  3Comments  ·  Source: helm/helm

It would be really nice to be able to do something like this in a template:

{{range .Files.EachLine "my/text/file"}}
  {{.}}
{{end}}

That would make it possible to process file lines before printing them in templates.

Pretty sure that would be a fairly minor change to https://github.com/kubernetes/helm/blob/master/pkg/chartutil/files.go

Most helpful comment

Maybe it should be called Lines()

All 3 comments

+1 this could be pretty handy!

Maybe it should be called Lines()

Closed by #1666 YAY!

Was this page helpful?
0 / 5 - 0 ratings