Documentation ¶
Index ¶
- func CompileCode(code interface{}) (ast.Node, error)
- func CompileExpr(code interface{}) (ast.Node, error)
- func Eval(expr interface{}, opts ...ExecOption) (interface{}, error)
- func RunCode(code interface{}, opts ...ExecOption) (map[string]interface{}, error)
- type ExecOption
- type ImportFunc
- type Runner
- func (r *Runner) Args(args ...string) *Runner
- func (r *Runner) CanEval(canEval bool) *Runner
- func (r *Runner) CompileCode(code interface{}) (ast.Node, error)
- func (r *Runner) CompileExpr(code interface{}) (ast.Node, error)
- func (r *Runner) Eval(expr interface{}) (interface{}, error)
- func (r *Runner) Filename(filename string) *Runner
- func (r *Runner) IsDebug(isDebug bool) *Runner
- func (r *Runner) Reset()
- func (r *Runner) Run(code interface{}) (interface{}, error)
- func (r *Runner) Stderr(w io.Writer) *Runner
- func (r *Runner) Stdout(w io.Writer) *Runner
- func (r *Runner) Var(name string, value interface{}) *Runner
- func (r *Runner) Workdir(wd string) *Runner
- type Val
- type Var
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileCode ¶
func CompileExpr ¶
func Eval ¶
func Eval(expr interface{}, opts ...ExecOption) (interface{}, error)
func RunCode ¶
func RunCode(code interface{}, opts ...ExecOption) (map[string]interface{}, error)
Types ¶
type ExecOption ¶
type ExecOption interface {
Apply(*Runner)
}
type ImportFunc ¶ added in v1.0.10
func (ImportFunc) Apply ¶ added in v1.0.10
func (f ImportFunc) Apply(runner *Runner)
Click to show internal directories.
Click to hide internal directories.