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

Function parseFloat

expfmt/text_parse.go:1002–1007  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

1000}
1001
1002func parseFloat(s string) (float64, error) {
1003 if strings.ContainsAny(s, "pP_") {
1004 return 0, errors.New("unsupported character in float")
1005 }
1006 return strconv.ParseFloat(s, 64)
1007}

Callers 2

startLabelValueMethod · 0.85
readingValueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected