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

Function writeEscapedString

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

Source from the content-addressed store, hash-verified

420)
421
422func writeEscapedString(w enhancedWriter, v string, includeDoubleQuote bool) (int, error) {
423 if includeDoubleQuote {
424 return quotedEscaper.WriteString(w, v)
425 }
426 return escaper.WriteString(w, v)
427}
428
429// writeFloat is equivalent to fmt.Fprint with a float64 argument but hardcodes
430// a few common cases for increased efficiency. For non-hardcoded cases, it uses

Callers 4

MetricFamilyToTextFunction · 0.85
writeLabelPairsFunction · 0.85

Calls 1

WriteStringMethod · 0.80

Tested by

no test coverage detected