# README
Template Functions
Examples
Operating System Helpers
- OS
{{OS}}
resolves to current running osruntime.GOOS
- ARCH
{{ARCH}}
resolves to current processor architectureruntime.GOARCH
File and Path Functions
- PWD
{{PWD}}
resolves to current working directory - FromSlash
{{FromSlash}}
uses go functionfilepath.FromSlash
- ToSlash
{{ToSlash}}
uses go functionfilepath.ToSlash
- ReadFile
{{ReadFile}}
read file contents, supports relative or absolute paths. - WriteFile
{{WriteFile 'file/path' 'string data'}}
write file contents, supports relative or absolute paths. - RemoveAll
{{RemoveAll 'file/path'}}
CAUTION removes file or folder and all children - MkdirAll
{{MkdirAll}}
- Touch
{{Touch}}
String Functions
- ToTitle
{{ToTitle}}
uses go functionstrings.Title
- ToUpper
{{ToUpper}}
uses go functionstrings.ToUpper
- ToLower
{{ToLower}}
uses go functionstrings.ToLower
- Replace
{{Replace}}
uses go functionstrings.Replace
Execution Functions
EXEC
{{EXEC `echo "hello"`}}
TRY
{{TRY `fails` | default `default value`}}
Expand
{{Expand}}
ExpandFile
{{ReadFile `my-template-file.yaml` | ExpandFile | WriteFile}}
JQ
{{JQ 'key.value[0]', '{"key": {"value":[1]} }'}}
{{ReadFile `my-file.json` | JQ `key.value[0]`}}
YQ
{{ReadFile `my-file.yaml` | YQ `key.value[0]`}}
# Packages
No description provided by the author
# Functions
Expand Template String.
ExpandFile and return as a string.
GlobMatch.
Run - run command.
SearchJSON a jmespath implementation for go.
SearchYAML converts yaml to JSON and runs a jmespath search.
# Structs
CommandOptions - new command runner.
ExpandOptions to use when expanding a string.
Functions template function map.
Variable struct.
Variables struct.