@@ -220,3 +220,24 @@ func (action *EventAction) Apply(other EventAction) {
|
||||
action.FireEvent = other.FireEvent
|
||||
}
|
||||
}
|
||||
|
||||
func (c EventCondition) String() string {
|
||||
str := make([]string, 0, 5)
|
||||
if len(c.LT) > 0 {
|
||||
str = append(str, "lt:" + c.LT)
|
||||
}
|
||||
if len(c.LTE) > 0 {
|
||||
str = append(str, "lte:" + c.LTE)
|
||||
}
|
||||
if len(c.EQ) > 0 {
|
||||
str = append(str, c.EQ)
|
||||
}
|
||||
if len(c.GTE) > 0 {
|
||||
str = append(str, "gte:" + c.GTE)
|
||||
}
|
||||
if len(c.GT) > 0 {
|
||||
str = append(str, "gte:" + c.GT)
|
||||
}
|
||||
|
||||
return strings.Join(str, ";")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user