MCPcopy
hub / github.com/PatchMon/PatchMon / metadataString

Function metadataString

server-source-code/internal/notifications/emitter.go:322–336  ·  view source on GitHub ↗
(m map[string]interface{}, key string)

Source from the content-addressed store, hash-verified

320}
321
322func 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
338func matchRulesOK(rulesJSON []byte, meta map[string]interface{}, eventType string) bool {
339 if len(rulesJSON) == 0 {

Callers 4

emitMethod · 0.85
injectAppLinkMethod · 0.85
cancelKeyForEventFunction · 0.85
delayedCancelKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected