Command line tool that compiles Golang templates with values from YAML files.
go get github.com/jgensler8/gotpl
Contents of template
:
Hello, {{.name}}. A friendly reminder that {{.note.json}}
Contents of input.yaml
---
name: <yourname>
note: {
"json": "json is valid yaml! :)"
}
$ ./gotpl -data examples/input/input.yaml -template examples/input/template.tmpl
Hello, <yourname>. A friendly reminder that json is valid yaml! :)
GOOS=linux go build
docker build -t gotpl .
docker run -v "$PWD/examples/input/input.yaml:/input/data" -v "$PWD/examples/input/template.tmpl:/input/template" gotpl