Skip to content

yurrriq/dinamo

 
 

Repository files navigation

Dynamic Generator

Lightweight command-line utility for generating file(s) from using go templates.

Status

GoDoc GoCard Coverage Status Build Status Maintainability MIT License

Install

  • Download pre-built binaries using Published Releases.

  • Alternatively install using go get:

go get github.com/yurrriq/dinamo/cmd/dinamo

Features

  • Generate file(s) using a template
  • Supports multiple data sources, key-value arguments, environment variables, YAML files, and JSON files
  • Supports sprig template functions

Usage

See detailed Usage

# create output.txt from config.tmpl using the key-value pairs
dinamo gen -t config.tmpl -f output.txt key1=value1 key2=value2

# create output.txt from config.tmpl using the JSON data file source.json
dinamo gen -t config.tmpl -f output.txt -d source.json

# create output.txt from config.tmpl using the YAML data file source.yaml
dinamo gen -t config.tmpl -f output.txt -d source.yaml

# create output.txt from config.tmpl using environment variables
dinamo gen -t config.tmpl -f output.txt -e

# create output.txt from config.tmpl using the key-value pairs and the YAML data file source.yml
dinamo gen -t config.tmpl -f output.txt -d source.yml key1=value1 key2=value2

# create output.txt from config.tmpl using the key-value pairs and the JSON data file source.json
dinamo gen -t config.tmpl -f output.txt -d source.json key1=value1 key2=value2

# create output.txt from config.tmpl using the key-value pairs and environment variables
dinamo gen -t config.tmpl -f output.txt -e key1=value1 key2=value2

# create output.txt from config.tmpl using the key-value pairs, environment variables, and the YAML data file source.yml
dinamo gen -t config.tmpl -f output.txt -e -d source.yml key1=value1 key2=value2

Contributions

Contributing guidelines are in CONTRIBUTING.md.

About

Dynamic Generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 75.6%
  • Shell 12.2%
  • Makefile 12.2%