gotpl

command module
v0.0.0-...-c3d531f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL