EvalString is a convenience that evaluates and returns a string.
(expr workflow.Expression, resolve VarResolver)
| 45 | if expr.DataType == workflowapi.String { |
| 46 | return evalStringExpr(expr.Expression, refs) |
| 47 | } |
| 48 | return evalCodeExpr(expr.Expression, expr.DataType, refs) |
| 49 | } |
| 50 | |
| 51 | // EvalString is a convenience that evaluates and returns a string. |
| 52 | func EvalString(expr workflowapi.Expression, resolve VarResolver) (string, error) { |
| 53 | v, err := Eval(expr, resolve) |
| 54 | if err != nil { |
| 55 | return "", err |
| 56 | } |