https://github.com/dvob/go-template
Simple CLI to render Go templates
https://github.com/dvob/go-template
Last synced: 11 months ago
JSON representation
Simple CLI to render Go templates
- Host: GitHub
- URL: https://github.com/dvob/go-template
- Owner: dvob
- Created: 2025-03-06T09:42:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-06T13:22:39.000Z (over 1 year ago)
- Last Synced: 2025-06-22T01:45:12.954Z (12 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-template
Simple CLI which allows to render [Go templates](https://pkg.go.dev/text/template) and pass data from JSON or YAML into it.
## Install
```
go install github.com/dvob/go-template@latest
```
## Usage
Without data:
```
go-template my-template.tmpl
```
With data and data format determined from file extension:
```
# json
go-template -d myfile.json my-template.tmpl
# yaml
go-template -d myfile.yaml my-template.tmpl
```
Specify data format:
```
go-template -d myfile -f json my-template.tmpl
```