Skip to content
/ tpl Public
forked from schneidexe/tpl

Use go templates with simple and complex environment variables

License

Notifications You must be signed in to change notification settings

tgagor/tpl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tpl

tpl is build for generating config files from templates using simple or complex (lists, maps, objects) shell environment variables. Since the binary has zero dependencies it is build for docker but you can use it across all platform and operating systems.

tpl uses sprig to extend golang's template capabilities.

Check the test section and have a look at test.tpl (template) and text.txt (result) in test folder for examples.

setup

Just download the binary for your OS and arch from the releases page.

If you want to use it inside your docker image you can add this to your Dockerfile:

ADD https://github.com/schneidexe/tpl/releases/download/v0.6.1/tpl-linux-amd64 /bin/tpl
RUN chmod a+x /bin/tpl

build

Local:

go get github.com/schneidexe/tpl

X-Platform:

go get github.com/mitchellh/gox
gox -osarch="darwin/amd64 darwin/arm64 linux/386 linux/amd64 linux/arm64 windows/386 windows/amd64"

test

./test.sh

About

Use go templates with simple and complex environment variables

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 71.6%
  • Smarty 17.5%
  • Shell 10.9%