Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDivideByZero = errors.New("divide by 0") ErrVariableNotFound = errors.New("variable not found") )
reserved error
Functions ¶
func IsDivideByZero ¶ added in v0.2.0
IsDivideByZero check error DivideByZero
func IsVariableNotFound ¶ added in v0.2.0
IsVariableNotFound check error VariableNotFound
Types ¶
type Comparator ¶
type Comparator interface { // Compare performs an comparison by giving a set of variables. Compare(Variables) (bool, error) fmt.Stringer }
Comparator is a special Evaluator whose evaluation expression is a comparison expression.
type Evaluator ¶
type Evaluator interface { // Eval performs an evaluation by giving a set of variables. Eval(Variables) (interface{}, error) //Strict sets the expression evaluation to run in strict mode. The default is false. //For example, the behavior changes when the variable is not set. // Referenced as nil if Strict is set to false. // If set to true, the expression evaluation will be Error. Strict(bool) // AsComparator attempts to convert to Comparator AsComparator() (Comparator, bool) fmt.Stringer }
Evaluator is a variable evaluator created based on one expression
type NumOfArgumentsMismatchError ¶ added in v0.4.0
NumOfArgumentsMismatchError is an error that occurs when the number of arguments of the called function is different.
func (*NumOfArgumentsMismatchError) Error ¶ added in v0.4.0
func (e *NumOfArgumentsMismatchError) Error() string
Click to show internal directories.
Click to hide internal directories.