A flexible commandline tool for template rendering. Supports lots of local and remote datasources.
This is largely a bug-fix and stability release, but also contains some fairly major internal refactoring, specifically to better support some future changes that will make gomplate easier to use as a library!
Be sure to check out the multi-platform Docker images available at hairyhenderson/gomplate
.
If you've gained value out of gomplate and want to find a way to encourage development, please consider sponsoring gomplate!
$GOMPLATE_LOG_FORMAT
environment variable to support changing logging formats (fix for #942)hairyhenderson/gomplate:alpine
Docker image now ships with an uncompressed binary. Fix for #1007
It's time for another gomplate release, and this time we have a good number of bug fixes, new functions, and updated dependencies.
Thanks to @surki and @jen20 for their contributions to this release!
Of particular note is the new experimental mode which you can use to try out some new functionality that isn't ready to be "locked in" just yet.
In particular, there are now some new RSA Encryption/Decryption functions, including crypto.RSAGenerateKey
, which gives you a way to quickly generate an RSA encryption key pair! The reason these are experimental is because I'm not sure about the UX yet, and the function names may change in a future release.
Be sure to check out the multi-platform Docker images available at hairyhenderson/gomplate
.
If you've gained value out of gomplate and want to find a way to encourage development, please consider sponsoring me!
experimental
configuration option. These features may change before being permanently enabled, and feedback is encouraged from early adopters!base64.DecodeBytes
crypto
namespace.
These should function correctly, but I'm looking for feedback on naming and usability, especially as related to encryption/decryption with other algorithms!
aws.EC2Tags
for returning all EC2 tags on the host - thanks to @surki!test.Kind
and test.IsKind
(implements #892)gcp.Meta
- thanks to @jen20!aws+sm
and aws+smp
keys that don't start with /
(fixes #868)slim
variant of gomplate, to avoid some bugs caused by a newer version (fixes #861)It's high time for another gomplate release! 🎉
The main feature this time around is new support for configuration files! Now you can store config files alongside templates and replace complicated command lines with a single call to gomplate
!
We now also have multi-platform Docker images available at hairyhenderson/gomplate
,
including support for ARM platforms and Windows.
And finally, if you've gained value out of gomplate and want to find a way to encourage development, please consider sponsoring me!
application/x-yaml
and application/text
mime types used in GCPcontext.Context
support and a loggerdata.ToCSV
aws+smp
datasourcesregexp.QuoteMeta
- wraps Go's regexp.QuoteMeta
function.coll.Pick
and coll.Omit
for filtering mapsunknown region
bug (fixes #795)--chmod
before opening output fileA big release after a bit of a hiatus. 😅
Big new features include plugin support and 3 new datasources (AWS S3, Google Cloud Storage, and Git!).
Also for those who are using the hairyhenderson/gomplate
Docker images, there are some new tags which will make it easier to stay up to date!
#625 New s3
datasource for reading datasources from AWS S3. See the docs for full information.
#632 New gs
datasource for reading datasources from Google Cloud Storage. See the docs for full information.
#661 New git
datasource! Supports git over HTTP(s), SSH, the "classic" Git protocol, and repos on local filesystems. See the docs for full information.
#581 New --exec-pipe
flag - allows piping output directly into a post-execution command
#635 With the new --plugin
/-p
flag you can plug in your own custom functions!
#683 When parsing a YAML stream with multiple documents (separated with ---
), gomplate will now return the first non-empty document
#651 New stable
and major (v3
) docker image tags - (fixes #648) thanks to @docwhat
stable
, v3
, stable-slim
, v3-slim
, stable-alpine
, v3-alpine
#598 and #677 Moved to go modules. As a result, if you import gomplate into your own code, your import paths need to change to github.com/hairyhenderson/gomplate/v3
strings.ShellQuote
/shellQuote
- thanks to @charles-dyfis-net for this one!coll.Flatten
/flatten
A small but mighty release, almost entirely powered by the community! 💪
The major features this time around are support for a AWS Secrets Manager data source, and list support for Consul data sources!
aws+sm
- many thanks to @nexeck for this contribution!In this release we've got some spring cleaning, 20 new functions, and a new way to dynamically name output files! 🚀🌷✨
Also, a new website is up at https://gomplate.ca, and the docs have moved to https://docs.gomplate.ca 📖
There's also now a #gomplate
Slack channel on the Gophers Slack instance. Get invited by going to https://invite.slack.golangbridge.org, then join #gomplate
and chat with the community and developers.
--output-map
argument for templating output paths (see docs for details)gomplate
- with npm
: npm install -g gomplate
uuid
namespace:
random
namespace:
strings.RuneCount
aws.KMSEncrypt
aws.KMSDecrypt
aws.Account
aws.UserID
aws.ARN
coll.JSONPath
A smaller relase this time, almost entirely full of new functions. An exciting new use-case is that a single template can now produce multiple outputs (with file.Write
)! 🚀
file.Write
tmpl
namespace:
strings.CamelCase
strings.SnakeCase
strings.WordWrap
There's lots of ✨ in this first release of 2019! 🎉🎊
Now, you can ignore files, merge datasources, and use .env
files as datasoures. Also, you can do a whole pile of new things with lists and maps with the functions in the new coll
namespace! See below for details...
.gomplateignore
support (@zealic)
--exclude
flag, allows ignoring certain files when processing directories with the --input-dir
argument. Works just like the .gitignore
filemerge:
datasource, for merging multiple datasources
.env
files
KEY=value
as key-value pairscoll
namespace:
coll.Append
/append
coll.Prepend
/prepend
coll.Uniq
/uniq
coll.Reverse
/reverse
coll.Keys
/keys
coll.Values
/values
coll.Dict
/dict
(renamed from conv.Dict
, which is now deprecated)coll.Slice
/slice
(renamed from conv.Slice
, which is now deprecated)coll.Has
/has
(renamed from conv.Has
, which is now deprecated)coll.Merge
/merge
coll.Sort
/sort