Skip to content
/ temgo Public
forked from malud/temgo

Environment variable based template engine like Jinja2 for your container config files. Lightweight, fast, go cli

License

Notifications You must be signed in to change notification settings

bemeyert/temgo

 
 

Repository files navigation

Build Status

temgo

Environment variable based template engine like Jinja2 for your container config files. Lightweight, fast, go cli

Note: wip

Usage

Define variables with the format {{ VAR_IABLE }} inside your template files and set them in your environment before tg execution.

Currently with stdin/stdout and inline support.

# pipe
TESTVAR=foo cat /opt/templates/file1.ext | tg > /dest/config/file1.ext
# or inline
TESTVAR=foo tg -i /dest/config/file1.ext

However, using the inline option on your templates will overwrite them. It is recommended to use this option on resettable files.

Placeholders which have no corresponding environment variable gets not replaced. echo 'foo {{ NOT_SET }} bar' | ./tg results in foo {{ NOT_SET }} bar

TODO

  • flags for file in/out
  • prefix flag for env var e.g. SERVICE_XXX

License

MIT

About

Environment variable based template engine like Jinja2 for your container config files. Lightweight, fast, go cli

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%