MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / sanitize

Function sanitize

pkg/event/formatter.go:382–391  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

380}
381
382func sanitize(s string) string {
383 return strings.Map(func(r rune) rune {
384 if r == '{' || r == '}' || unicode.IsSpace(r) {
385 return -1
386 }
387 return r
388 },
389 s,
390 )
391}
392
393func normalizeTemplate(tmpl string) string { return tmplNormRegexp.ReplaceAllString(tmpl, "{{$2}}") }
394

Callers 1

NewFormatterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected