In Puppet it is possible to lookup variables in files using ERBs, e.g.:
<% @values.each do |val| -%> Some stuff with <%= val %> <% end -%>
How to do the same using Go?
In Puppet it is possible to lookup variables in files using ERBs, e.g.:
<% @values.each do |val| -%> Some stuff with <%= val %> <% end -%>
How to do the same using Go?
The question is a bit unclear, but Go has a very powerful template engine built in: https://golang.org/pkg/text/template/
There's even a special HTML extension package of it that does automatic escaping based on context (attributes, tags, text, etc) - https://golang.org/pkg/html/template/
The above example would look something like:
{{ range .Values }}
Some stuff with {{ . }}
{{ end }}