zeekayandHanzo Dev 36b0f41066 ci: canonical pair — hanzo.yml + forge caller
github.com has no runner for hanzo-build-linux-amd64, so a caller under
.github/workflows is a gate that can never be scheduled. This is the ~7-line
caller on the plane that can (git.hanzo.ai git-runner fleet), pinned @v1.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-06 02:29:39 -07:00

eval

An arbitrary expression evaluator for Go. Parses a string expression once into an EvaluableExpression, then evaluates it repeatedly against a set of named parameters, returning a single interface{} result.

Supports arithmetic, comparison, logical, bitwise, ternary, and string operators; regular-expression matching; membership (in); parameter accessors that reach into struct fields and map keys (obj.Field); and user-defined functions.

expr, err := eval.NewEvaluableExpression("foo > 0 && bar in ('a', 'b')")
result, err := expr.Evaluate(map[string]interface{}{"foo": 1, "bar": "a"})
// result == true

For a stable set of custom functions, build with eval.NewEvaluableExpressionWithFunctions. To supply parameters lazily, pass any value implementing the Parameters interface to Eval.

Provenance

Taken from github.com/casbin/govaluate v1.3.0, itself a fork of github.com/Knetic/govaluate by George Lester. See NOTICE for the full lineage and LICENSE for the MIT terms.

S
Description
Expression evaluator (Go) forked from casbin/govaluate v1.3.0; package renamed to eval.
Readme MIT
72 KiB
Languages
Go 100%