MCPcopy Create free account
hub / github.com/prometheus/common / writeEscapedString

Function writeEscapedString

expfmt/text_create.go:466–471  ·  view source on GitHub ↗
(w enhancedWriter, v string, includeDoubleQuote bool)

Source from the content-addressed store, hash-verified

464)
465
466func writeEscapedString(w enhancedWriter, v string, includeDoubleQuote bool) (int, error) {
467 if includeDoubleQuote {
468 return quotedEscaper.WriteString(w, v)
469 }
470 return escaper.WriteString(w, v)
471}
472
473// writeFloat is equivalent to fmt.Fprint with a float64 argument but hardcodes
474// a few common cases for increased efficiency. For non-hardcoded cases, it uses

Callers 5

MetricFamilyToTextFunction · 0.85
writeNameAndLabelPairsFunction · 0.85
writeNameFunction · 0.85

Calls 1

WriteStringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…