Skip to content
/ tmpl Public

A template parser and compiler for Go

License

Notifications You must be signed in to change notification settings

abcum/tmpl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmpl

A command line tool for parsing and generating template files for Go (Golang).

Features

  • Generate files from templates
  • Useful for go:generate commands
  • Accepts data as json or from a file
  • Templates are processed and compiled
  • Process and compile multiple templates at once

Installation

go get github.com/abcum/tmpl

Usage

tmpl -file data.json file1.go.tmpl file2.go.tmpl
tmpl -data '["foo","bar","baz"]' file1.go.tmpl file2.go.tmpl