Skip to content

Latest commit

 

History

History
26 lines (15 loc) · 562 Bytes

README.md

File metadata and controls

26 lines (15 loc) · 562 Bytes

gotpl - CLI tool for Golang templates

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

Inspired by Python/Jinja2's j2cli.

Install

go get github.com/tsg/gotpl

Usage

Say you have a template file like this:

{{.first_name}} {{.last_name}} is {{.age}} years old.

and a user.yml YAML file like this one:

first_name: Max
last_name: Mustermann
age: 30

You can compile the template like this:

gotpl template < user.yml