gtp

package module
v0.0.0-...-6b5fb23 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

README

gtp

macro processor powered by Go (text|html)/template

Install

go install github.com/taskie/gtp/cmd/gtp

Usage

gtp -d john.json hello.tmpl >john.txt

or

gtp -D json hello.tmpl <john.json >john.txt
Template (hello.tmpl)
Hello, {{.user.name}}!
Input (john.json)
{"user": {"name": "John"}}
Output (john.txt)
Hello, John!

Dependency

dependency

License

Apache License 2.0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version  = "0.1.0-beta"
	Revision = ""
)

Functions

This section is empty.

Types

type Gtp

type Gtp struct {
	TemplateFilePaths []string
	TemplateType      string
	DataType          string
}

func (*Gtp) Execute

func (gtp *Gtp) Execute(w io.Writer, data interface{}) error

func (*Gtp) Run

func (gtp *Gtp) Run(w io.Writer, r io.Reader) error

Directories

Path Synopsis
cli
gtp
cmd
gtp command

Jump to

Keyboard shortcuts

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