Skip to content

v1.14.0

Compare
Choose a tag to compare
@antonmedv antonmedv released this 16 Aug 09:52
· 376 commits to master since this release
8f2cfbf

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy, safety, and speed.

expr repl demo

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.