Skip to content

luke-chisholm6/go-cli-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-cli-templates Build Status Coverage Status

This is a simple command line utility that leverages the go text/template package to generate dynamic files. My use case is for generating AWS Cli json command files in a ci pipeline.

Installation

go get github.com/luke-chisholm6/go-cli-templates

or download the applicable binary for your platform from github releases replace darwin_amd64 with your os/arch combo (linux_386)

# using wget
wget https://github.com/luke-chisholm6/go-cli-templates/releases/download/0.1.0/go-cli-templates_darwin_amd64 -O /usr/local/bin/go-cli-templates 
# using curl
curl https://github.com/luke-chisholm6/go-cli-templates/releases/download/0.1.0/go-cli-templates_darwin_amd64 -Lo /usr/local/bin/go-cli-templates 
# don't forget to make it executable
chmod +x /usr/local/bin/go-cli-templates

Usage

echo "{{.key1}} {{.key2}}" | go-cli-templates key1=Hello key2=world!
# will output: "Hello world!"

About

the motivation behind this package is to be able to generate configuration files based off of command line options

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages