Top 1.1% forks on proxy.golang.org
proxy.golang.org : gopkg.in/antonmedv/expr.v0
Package expr is an engine that can evaluate expressions. You can pass variables into the expression, which can be of any valid Go type (including structs): Expr uses reflection for accessing and iterating passed data. For example you can pass nested structures without any modification or preparation: You can also pass functions into the expression: If you planning to execute some expression lots times, it's good to compile it first and only one time: It is possible to check used variables and functions during parsing of the expression. Only `Request` and `Values` will be available inside expression, otherwise parse error. If you try to use some undeclared variables or functions, an error will be returned during compilation: Compiled ast can be compiled back to string expression using stringer fmt.Stringer interface: Inside Expr engine there is no distinguish between int, uint and float types (as in JavaScript). All numbers inside Expr engine represented as `float64`. You should remember about it if you use any of binary operators (`+`, `-`, `/`, `*`, etc). Otherwise type remain unchanged.
Registry
- Homepage
- Documentation
- JSON
purl: pkg:golang/gopkg.in/antonmedv/expr.v0
Keywords:
bytecode
, configuration-language
, engine
, evaluator
, expr
, expression
, expression-evaluator
, expression-language
, go
, golang
, rule-engine
License: MIT
Latest release: about 7 years ago
First release: about 7 years ago
Namespace: gopkg.in/antonmedv
Stars: 5,680 on GitHub
Forks: 370 on GitHub
Total Commits: 754
Committers: 59
Average commits per author: 12.78
Development Distribution Score (DDS): 0.102
More commit stats: commits.ecosyste.ms
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/antonmedv
Last synced: 24 days ago