(m map[string]interface{}, key string)
| 320 | } |
| 321 | |
| 322 | func metadataString(m map[string]interface{}, key string) string { |
| 323 | if m == nil { |
| 324 | return "" |
| 325 | } |
| 326 | v, ok := m[key] |
| 327 | if !ok || v == nil { |
| 328 | return "" |
| 329 | } |
| 330 | switch t := v.(type) { |
| 331 | case string: |
| 332 | return t |
| 333 | default: |
| 334 | return fmt.Sprint(t) |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | func matchRulesOK(rulesJSON []byte, meta map[string]interface{}, eventType string) bool { |
| 339 | if len(rulesJSON) == 0 { |
no outgoing calls
no test coverage detected