Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `getv` template function does not accept a default value. The workaround is to write templates like this: {{if exists "/example/app/option"}} option = {{getv "/example/app/option"}}{{else}}default_value{{end}} Resolve the issue by accepting an optional default value. Templates can now be written like this: value: {{getv "/key" "default_value"}} This change is backwards compatible with the current `getv` function. If the key is missing and a default value is given the missing key error will be suppressed and the default value will be returned. If the key is missing and no default value is given the `getv` function will return an error and template processing will halt. Fixes #219
- Loading branch information