tplrender

command module
v0.0.0-...-622db0b Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2021 License: MIT Imports: 9 Imported by: 0

README

tplrender

Go template rendering CLI

Usage

go get github.com/bancek/tplrender

tplrender -template - '{"name": "World"}' <<EOF
{{\$data := ((index .Args 0) | fromJson)}}Hello {{\$data.name}}
There is no place like {{.Env.HOME}}
EOF

Template context:

  • .Args: process arguments from flag.Args()
  • .Env: map[string]string of the process's environment variables

sprig template functions are available in the template.

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