From 8a4fdc3dd5e7aeca658833eed69c72be7a8c394c Mon Sep 17 00:00:00 2001 From: David Adams Date: Wed, 25 May 2016 19:35:09 -0500 Subject: [PATCH] Update docs for lookup() interpolation function Add specifics about using the optional third argument for providing a default value. --- website/source/docs/configuration/interpolation.html.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/source/docs/configuration/interpolation.html.md b/website/source/docs/configuration/interpolation.html.md index 85d2708ebe..3b414db7b0 100644 --- a/website/source/docs/configuration/interpolation.html.md +++ b/website/source/docs/configuration/interpolation.html.md @@ -160,9 +160,11 @@ The supported built-in functions are: * `${length(split(",", "a,b,c"))}` = 3 * `${length("a,b,c")}` = 5 - * `lookup(map, key)` - Performs a dynamic lookup into a mapping + * `lookup(map, key [, default])` - Performs a dynamic lookup into a mapping variable. The `map` parameter should be another variable, such - as `var.amis`. + as `var.amis`. If `key` does not exist in `map`, the interpolation will + fail unless you specify a third argument, `default`, which should be a + string value to return if no `key` is found in `map. * `lower(string)` - Returns a copy of the string with all Unicode letters mapped to their lower case.