Tags: kelseyhightower/confd
Tags
getv accepts a default value 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
Capture and return errors during watches on consul Before this change consul errors were not returned correctly during watches. Resolved the issue by returning the initial watch index and error and avoid the nil pointer dereference. Fixes #322
PreviousNext