https://github.com/abcum/tmpl
A template parser and compiler for Go
https://github.com/abcum/tmpl
generator go golang golang-tools template-processor
Last synced: 3 months ago
JSON representation
A template parser and compiler for Go
- Host: GitHub
- URL: https://github.com/abcum/tmpl
- Owner: abcum
- License: apache-2.0
- Created: 2017-02-24T12:46:26.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-09-29T09:24:56.000Z (over 6 years ago)
- Last Synced: 2025-01-03T10:16:22.543Z (about 1 year ago)
- Topics: generator, go, golang, golang-tools, template-processor
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tmpl
A command line tool for parsing and generating template files for Go (Golang).
[](https://circleci.com/gh/abcum/tmpl) [](https://github.com/abcum/tmpl) [](https://godoc.org/github.com/abcum/tmpl) [](https://goreportcard.com/report/github.com/abcum/tmpl) [](https://github.com/abcum/tmpl)
#### 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
```bash
go get github.com/abcum/tmpl
```
#### Usage
```bash
tmpl -file data.json file1.go.tmpl file2.go.tmpl
```
```bash
tmpl -data '["foo","bar","baz"]' file1.go.tmpl file2.go.tmpl
```