Documentation ¶
Index ¶
- Variables
- func Initial(suites map[string][]string, kv map[string]string)
- type Actions
- type Empty
- type Features
- func (f *Features) Cfg(key string) (string, bool)
- func (f *Features) CfgAll(expressions ...string) bool
- func (f *Features) CfgAny(expressions ...string) bool
- func (f *Features) CfgAs(key string, handle func(v string))
- func (f *Features) CfgBe(expression string, handle Fn)
- func (f *Features) CfgIf(expression string) bool
- func (f *Features) CfgIn(actions Actions, defAct ...Fn)
- func (f *Features) CfgNot(expression string, handle func())
- func (f *Features) CfgOn(actions Actions, defAct ...Fn)
- func (f *Features) Use(suite []string, noDefault bool)
- func (f *Features) UseDefault()
- type Fn
Constants ¶
This section is empty.
Variables ¶
var ( // Use alias of Features.Use func Use = _features.Use // UseDeafult alias of Features.UseDefault func UseDefault = _features.UseDefault // As alias of Features.Cfg func Val = _features.Cfg // As alias of Features.CfgAs func As = _features.CfgAs // If alias of Features.CfgIf func If = _features.CfgIf // If alias of Features.CfgAll func All = _features.CfgAll // If alias of Features.CfgAny func Any = _features.CfgAny // In alias of Features.CfgIn func In = _features.CfgIn // On alias of Features.CfgOn func On = _features.CfgOn // Be alias of Feaures.CfgBe func Be = _features.CfgBe // Not alias of Features.CfgNot func Not = _features.CfgNot )
Functions ¶
Types ¶
type Features ¶
type Features struct {
// contains filtered or unexported fields
}
Features fetures info struct
func NewFeatures ¶
NewFeatures create new Features instance
func (*Features) CfgAll ¶ added in v0.4.0
CfgAll check all expressions is true. Return false if any one expression in expresssions is false or expressions is empty.
func (*Features) CfgAny ¶ added in v0.4.0
CfgAny check any expressions is true. Return false if all expressions is false or expressions is empty.
func (*Features) CfgBe ¶
CfgBe check expression is true then do the handle. if expression just have a string like `Sms` is mean `Sms` whether defined in suite feature settings. expression like `Sms = SmsJuhe` is mean whether `Sms` define in suite feature settings and value is `SmsJuhe`
func (*Features) CfgIf ¶
CfgIf check expression is true. if expression just have a string like `Sms` is mean `Sms` whether define in suite feature settings. expression like `Sms = SmsJuhe` is mean whether `Sms` define in suite feature settings and value is `SmsJuhe`
func (*Features) CfgIn ¶
CfgIn range actions to check item's expression is true then do the handle, defFn will handle if all items are not matched,
func (*Features) CfgNot ¶
CfgNot check expression is not true then do the handle. if expression just have a string like `Sms` is mean `Sms` whether defined in suite feature settings. expression like `Sms = SmsJuhe` is mean whether `Sms` define in suite feature settings and value is `SmsJuhe`
func (*Features) CfgOn ¶ added in v0.2.0
CfgOn range actions to check item's expression is true then do the handle and return, defFn will handle if all items are not matched,
func (*Features) UseDefault ¶
func (f *Features) UseDefault()
UseDefault use default suite for features