Documentation
¶
Overview ¶
Command testexpr evaluates an expr-lang expression against a JSON environment and prints the result. Meant for local iteration on spec expressions, not for end users.
Usage:
go run ./cmd/testexpr <expression> [envJSON|@file|-]
The env arg defaults to "{}" when omitted. "-" reads JSON from stdin; "@file" reads it from a file; anything else is parsed as a literal JSON string. The expression is evaluated with the same helper functions (truncate, coalesce, epochMs, ...) available to spec expressions, injected via exprenv.BaseFuncs.
Click to show internal directories.
Click to hide internal directories.