Documentation ¶
Overview ¶
Package tryfunc contains some optional functions that can be exposed in HCL-based languages to allow authors to test whether a particular expression can succeed and take dynamic action based on that result.
These functions are implemented in terms of the customdecode extension from the sibling directory "customdecode", and so they are only useful when used within an HCL EvalContext. Other systems using cty functions are unlikely to support the HCL-specific "customdecode" extension.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CanFunc function.Function
CanFunc tries to evaluate the expression given in its first argument.
var TryFunc function.Function
TryFunc is a variadic function that tries to evaluate all of is arguments in sequence until one succeeds, in which case it returns that result, or returns an error if none of them succeed.
Functions ¶
This section is empty.
Types ¶
This section is empty.