gotpl

command module
Version: v0.0.0-...-16abdd3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2018 License: Apache-2.0 Imports: 8 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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL