Documentation ¶
Index ¶
- Constants
- func Equal(code1, code2 string) bool
- func Execute(code string, reader KV) (bool, error)
- func ExecuteMap(code string, data map[string]interface{}) (bool, error)
- func MustExecute(code string, reader KV) bool
- func MustExecuteMap(code string, data map[string]interface{}) bool
- type Assert
- type KV
- type Value
- func (v Value) Add(v2 Value) Value
- func (v Value) And(v2 Value) Value
- func (v Value) Boolean() bool
- func (v Value) Div(v2 Value) Value
- func (v Value) E(v2 Value) Value
- func (v Value) Error() error
- func (v Value) Float() (float64, error)
- func (v Value) GT(v2 Value) Value
- func (v Value) GTE(v2 Value) Value
- func (v Value) LT(v2 Value) Value
- func (v Value) LTE(v2 Value) Value
- func (v Value) MATCH(v2 Value) Value
- func (v Value) Mod(v2 Value) Value
- func (v Value) Multi(v2 Value) Value
- func (v Value) NE(v2 Value) Value
- func (v Value) NRE(v2 Value) Value
- func (v Value) Not() Value
- func (v Value) Or(v2 Value) Value
- func (v Value) RE(v2 Value) Value
- func (v Value) String() string
- func (v Value) Sub(v2 Value) Value
Constants ¶
View Source
const ( Nil = iota Boolean Number String Error )
Value types
View Source
const AND = 57347
View Source
const (
CUT = 100000
)
CUT code
View Source
const E = 57352
View Source
const EOF = 57360
View Source
const GT = 57357
View Source
const GTE = 57359
View Source
const LB = 57350
View Source
const LT = 57356
View Source
const LTE = 57358
View Source
const MATCH = 57361
View Source
const NE = 57353
View Source
const NOT = 57349
View Source
const NRE = 57355
View Source
const OR = 57348
View Source
const RB = 57351
View Source
const RE = 57354
View Source
const VALUE = 57346
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
Equal check if the two assert expression is equal, (mainly ignore the white space charactors)
func ExecuteMap ¶
ExecuteMap is a convenient function to execute code with data
func MustExecute ¶
MustExecute is same with Execute, but panic if has error
func MustExecuteMap ¶
MustExecuteMap is same with ExecuteMap, but panic if has error
Types ¶
type Assert ¶
Assert 代表一个表达式
Click to show internal directories.
Click to hide internal directories.