MCPcopy Index your code
hub / github.com/buger/jsonparser / ParseFloat

Function ParseFloat

parser.go:1349–1355  ·  view source on GitHub ↗

ParseNumber parses a Number ValueType into a Go float64 SYS-REQ-013, SYS-REQ-037, SYS-REQ-065

(b []byte)

Source from the content-addressed store, hash-verified

1347// ParseNumber parses a Number ValueType into a Go float64
1348// SYS-REQ-013, SYS-REQ-037, SYS-REQ-065
1349func ParseFloat(b []byte) (float64, error) {
1350 if v, err := parseFloat(&b); err != nil {
1351 return 0, MalformedValueError
1352 } else {
1353 return v, nil
1354 }
1355}
1356
1357// ParseInt parses a Number ValueType into a Go int64
1358// SYS-REQ-015, SYS-REQ-039, SYS-REQ-040, SYS-REQ-058, SYS-REQ-059, SYS-REQ-064

Callers 6

TestParseHelperNilSafetyFunction · 0.85
FuzzParseFloatFunction · 0.85
TestParseFloatFunction · 0.85
GetFloatFunction · 0.85
TestParseFloatEmptyFunction · 0.85

Calls 1

parseFloatFunction · 0.70

Tested by 4

TestParseHelperNilSafetyFunction · 0.68
TestParseFloatFunction · 0.68
TestParseFloatEmptyFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…