From 7f81ef560c3798e42e6dcfe0725185caee36fdb3 Mon Sep 17 00:00:00 2001 From: James Rasell Date: Thu, 27 Sep 2018 21:45:00 +0200 Subject: [PATCH] Add documentation for toLower and toUpper template functions. Closes #238 --- docs/templates.md | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/docs/templates.md b/docs/templates.md index 28649766c..4daa381bf 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -143,6 +143,23 @@ Render: localhost:3306 ``` +#### env + +Returns the value of the given environment variable. + +Example: +``` +[[ env "HOME" ]] +[[ or (env "NON_EXISTENT") "foo" ]] +``` + +Render: +``` +/bin/bash +foo +``` + + #### loop Accepts varying parameters and differs its behavior based on those parameters as detailed below. @@ -308,18 +325,30 @@ Render: 2018-06-25T16:45:08+09:00 ``` -#### env +#### toLower -Returns the value of the given environment variable. +Takes the argument as a string and converts it to lowercase. Example: ``` -[[ env "HOME" ]] -[[ or (env "NON_EXISTENT") "foo" ]] +[[ key "service/config/queue-name" | toLower ]] ``` Render: ``` -/bin/bash -foo +queue-name +``` + +#### toUpper + +Takes the argument as a string and converts it to uppercase. + +Example: +``` +[[ key "service/config/queue-name" | toUpper ]] +``` + +Render: +``` +QUEUE-NAME ```