expression

package
v1.0.335 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Eval

func Eval[T any](ctx context.Context, exp string, vars map[string]interface{}) (retval T, reterr error)

Eval evaluates an expression given a set of variables and returns a generic type.

func EvalAny added in v0.1.175

func EvalAny(ctx context.Context, exp string, vars map[string]interface{}) (retval interface{}, reterr error)

EvalAny evaluates an expression given a set of variables and returns a 'boxed' interface type.

func GetVariables added in v0.1.175

func GetVariables(exp string) (map[string]struct{}, error)

GetVariables returns a list of variables mentioned in an expression

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL