Skip to content
/ gotpl Public
forked from CDKGlobal/gotpl

CLI tool for Golang templates

License

Notifications You must be signed in to change notification settings

atsaur/gotpl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gotpl - CLI tool for Golang templates

Command line tool that compiles Golang templates with values from YAML files.

Install

go get github.com/jgensler8/gotpl

Usage

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! :)

Dockerfile

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

About

CLI tool for Golang templates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 88.9%
  • Shell 11.1%