These changes overrides the `default` function provided by sprig with an alternative to retrieve variable values from variables that might not have been declared at all. Referencing a variable in a template that is not declared, will lead to the underlying templating functionality raising an error, causing kontemplate to exit. The override alternative to `default` accepts a second string argument with the variable name. If the variable in question has not been declared the first argument's value would be returned, just as the original `default` function does. |
||
|---|---|---|
| .. | ||
| testdata | ||
| dns.go | ||
| pass.go | ||
| templater.go | ||
| templater_test.go | ||