Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 945 Bytes

EXPRESSIONS.md

File metadata and controls

28 lines (19 loc) · 945 Bytes

Expressions

About the expression syntax we use.

You can read about the expression language definition. We additionally add functions:

Function Description
bytes Convert into a byte array
int Convert to an int
json Converts an object to a JSON byte array
object Converts JSON as string or byte arrays to an object
string Convert to a string

Sprig

Like Argo Workflows, Sprig functions are available under 'sprig'.

To invoke a Sprig function, change the name into a function call. The last parameter is usually your variable.

Examples:

Description Example
Trim whitespace sprig.trim(" my-msg ")
Replace "a" with "b" sprig.replace("a", "b", "my-msg")

Warning! Sprig functions usually do not return errors on invalid parameters.