MCPcopy
hub / github.com/prometheus/prometheus / unreplace

Function unreplace

model/textparse/promparse.go:513–519  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

511)
512
513func unreplace(s string) string {
514 // Replacer causes allocations. Replace only when necessary.
515 if strings.IndexByte(s, byte('\\')) >= 0 {
516 return lvalReplacer.Replace(s)
517 }
518 return s
519}
520
521func yoloString(b []byte) string {
522 return unsafe.String(unsafe.SliceData(b), len(b))

Callers 2

LabelsMethod · 0.85
LabelsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…