Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy, safety, and speed.
In this release:
-
New builtin functions:
- abs, int, float, string, max, min
- trim, trimPrefix, trimSuffix
- upper, lower
- split, splitN, splitAfter, splitAfterN
- replace, repeat, join, indexOf, lastIndexOf
- hasPrefix, hasSuffix
- toJSON, fromJSON, toBase64, fromBase64
- now, duration, date
- first, last, get
-
New pipe
|
operator.1..9 | filter(# < 5) | map(# * 2)
To enable the pipe operator add
expr.ExperimentalPipes()
option.program, err = expr.Compile(code, expr.ExperimentalPipes())
-
New repl with interactive debugger.