conditionHandler is a helper that accepts condition config and returns a function that checks if the condition is met
(cond moduleconfig.Condition)
| 342 | |
| 343 | // conditionHandler is a helper that accepts condition config and returns a function that checks if the condition is met |
| 344 | func conditionHandler(cond moduleconfig.Condition) CustomConditionSignature { |
| 345 | if cond.Action == "KeyMatchCondition" { |
| 346 | return KeyMatchCondition(cond.MatchField, cond.WhenValue) |
| 347 | } else { |
| 348 | flog.Errorf("Unsupported condition") |
| 349 | return nil |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | func appendToSet(set []string, toAppend []string) []string { |
| 354 | for _, appendee := range toAppend { |
no test coverage detected