github.com/apaxa-go/eval (go): Package eval implements evaluation of GoLang expression at runtime.  Requirements for expression:  What does supported:  Supported expression:  Predefined types (no need to pass it via args):  Implemented built-in functions (no need to pass it via args):  Simple example:  Complicated example:  Example with error in expression:  Package eval built on top of reflection, go/ast, go/parser, go/token & go/constant. To create Expression it possible to use MakeExpression or some of Parse* functions. All of them use pkgPath to control access rights. pkgPath used when:  1. Accessing struct private field. If type of struct belong to pkgPath then all access to struct fields can modify its value (for example, it is possible to set such fields in composite literal).  2. Creating type in composite literal. All created in expression structures belong to pkgPath.  When Expression is ready it may be evaluated multiple times. Evaluation done via Eval* methods:  In most cases EvalToInterface should be enough and it is easy to use.  Evaluation performance:  If you found a bug (result of this package evaluation differs from evaluation by Go itself) - please report bug at github.com/apaxa-go/eval.
Keywords: eval|golang|golang-expression|library