Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apparentlymart/hcltemplate
CLI filter for rendering JSON objects using the HCL template language
https://github.com/apparentlymart/hcltemplate
Last synced: 2 months ago
JSON representation
CLI filter for rendering JSON objects using the HCL template language
- Host: GitHub
- URL: https://github.com/apparentlymart/hcltemplate
- Owner: apparentlymart
- License: mpl-2.0
- Created: 2019-11-05T18:28:18.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-03T19:25:17.000Z (almost 5 years ago)
- Last Synced: 2024-10-10T18:26:46.299Z (3 months ago)
- Language: Go
- Size: 16.6 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hcltemplate
`hcltemplate` is a filter program for transforming JSON objects into other
strings using the [HCL](https://hcl.readthedocs.io/) template language.There are [precompiled releases](https://github.com/apparentlymart/hcltemplate/releases)
available for various platforms.It expects to find a JSON object on its stdin and produces text on its stdout
using a template file given on the command line.For example, given the following `input.json`:
```json
{
"name": "Jacqueline"
}
```...and the following `template.tmpl`:
```
Hello ${name}
```We can render the template with the JSON input like this:
```
$ ./hcltemplate template.tmpl