gotpl icon indicating copy to clipboard operation
gotpl copied to clipboard

support multiple yaml files

Open junpayment opened this issue 7 years ago • 0 comments

In case below.

yamls/ |- foo `- bar

# foo
this is {{.foo}}.

# bar
this is {{.bar}}.

# setting.yml
foo: FOO
bar: BAR
$ gotpl yamls/* < setting.yml
# this will be expanded => "gotpl yamls/foo.yml yamls/bar.yml < setting.yml"

I expected both yaml files to be output. But I got a result like that.

this is FOO

It seems there was a cause for how to use template.ParseFiles, so I fixed it.

junpayment avatar Mar 06 '18 06:03 junpayment