Documentation ¶
Index ¶
- func Eval(node *ast.BinaryOperationExpr, args ...interface{}) (interface{}, error)
- func EvalCaseWhenFunction(node *ast.CaseExpr, args ...interface{}) (interface{}, error)
- func EvalCastFunction(node *ast.FuncCastExpr, args ...interface{}) (interface{}, error)
- func EvalFunction(node *ast.FuncCallExpr, args ...interface{}) (interface{}, error)
- func EvalString(script string, args ...interface{}) (interface{}, error)
- func ReturnJsRuntime(js *JsRuntime)
- type JsRuntime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Eval ¶
func Eval(node *ast.BinaryOperationExpr, args ...interface{}) (interface{}, error)
Eval calculates the result of math expression with custom args.
func EvalCaseWhenFunction ¶
func EvalCastFunction ¶
func EvalCastFunction(node *ast.FuncCastExpr, args ...interface{}) (interface{}, error)
func EvalFunction ¶
func EvalFunction(node *ast.FuncCallExpr, args ...interface{}) (interface{}, error)
EvalFunction calculates the result of math expression with custom args.
func EvalString ¶
EvalString computes the result of given expression script with custom args.
func ReturnJsRuntime ¶
func ReturnJsRuntime(js *JsRuntime)
Types ¶
type JsRuntime ¶
func BorrowJsRuntime ¶
func BorrowJsRuntime() *JsRuntime
func NewJSRuntime ¶
func NewJSRuntime() *JsRuntime
Click to show internal directories.
Click to hide internal directories.