Skip to content

Commit

Permalink
functions: lookup third argument is not optional
Browse files Browse the repository at this point in the history
  • Loading branch information
johakoch authored Mar 15, 2024
1 parent a0c3e7b commit 0e3c880
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cty/function/stdlib/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -1506,8 +1506,8 @@ func Keys(inputMap cty.Value) (cty.Value, error) {
}

// Lookup performs a dynamic lookup into a map.
// There are two required arguments, map and key, plus an optional default,
// which is a value to return if no key is found in map.
// There are three required arguments, inputMap and key, plus a defaultValue,
// which is a value to return if the given key is not found in the inputMap.
func Lookup(inputMap, key, defaultValue cty.Value) (cty.Value, error) {
return LookupFunc.Call([]cty.Value{inputMap, key, defaultValue})
}
Expand Down

0 comments on commit 0e3c880

Please sign in to comment.