hay-kot / gotmpl

Simple CLI for render a template file from a data file (TOML, JSON, YAML) using Go Templates with utility template functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gotmpl

Tiny CLI template engine for generating files quickly

Gotmpl brings Go's Templates to your terminal along with some helpful functions courtesy of Sprig. Usage is extremely simple, after installing the binary, you can use it like so:

gotmpl render --tmpl ./template.tmpl --data ./data.json > ./output.txt

Features

  • Sprig functions
  • Support for JSON, YAML, and TOML data files

Installation

Homebrew

brew install hay-kot/gotmpl-tap/gotmpl

Go

go install https://github.com/hay-kot/gotmpl

About

Simple CLI for render a template file from a data file (TOML, JSON, YAML) using Go Templates with utility template functions

License:MIT License


Languages

Language:Go 100.0%