Documentation ¶
Index ¶
- func ContainsUnresolvedVariables(items ...string) error
- func ContainsVariablesWithIgnoreList(skipNames map[string]interface{}, items ...string) error
- func ContainsVariablesWithNames(names map[string]interface{}, items ...string) error
- func Eval(expression string, values map[string]interface{}) (interface{}, error)
- func Evaluate(data string, base map[string]interface{}) (string, error)
- func EvaluateByte(data []byte, base map[string]interface{}) ([]byte, error)
- func FindExpressions(data, OpenMarker, CloseMarker string, base map[string]interface{}) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsUnresolvedVariables ¶
ContainsUnresolvedVariables returns an error with variable names if the passed input contains unresolved {{<pattern-here>}} variables.
func ContainsVariablesWithIgnoreList ¶
ContainsVariablesWithIgnoreList returns an error with variable names if the passed input contains unresolved {{<pattern-here>}} other than the ones listed in the ignore list
func ContainsVariablesWithNames ¶
ContainsVariablesWithNames returns an error with variable names if the passed input contains unresolved {{<pattern-here>}} variables within the provided list
func Eval ¶
Eval compiles the given expression and evaluate it with the given values preserving the return type
func Evaluate ¶
Evaluate checks if the match contains a dynamic variable, for each found one we will check if it's an expression and can be compiled, it will be evaluated and the results will be returned.
The provided keys from finalValues will be used as variable names for substitution inside the expression.
func EvaluateByte ¶
EvaluateByte checks if the match contains a dynamic variable, for each found one we will check if it's an expression and can be compiled, it will be evaluated and the results will be returned.
The provided keys from finalValues will be used as variable names for substitution inside the expression.
func FindExpressions ¶
Types ¶
This section is empty.