MCPcopy Create free account
hub / github.com/francoispqt/gojay / getFloatNegative

Method getFloatNegative

decode_number_float.go:95–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93}
94
95func (dec *Decoder) getFloatNegative() (float64, error) {
96 // look for following numbers
97 for ; dec.cursor < dec.length || dec.read(); dec.cursor++ {
98 switch dec.data[dec.cursor] {
99 case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
100 return dec.getFloat()
101 default:
102 return 0, dec.raiseInvalidJSONErr(dec.cursor)
103 }
104 }
105 return 0, dec.raiseInvalidJSONErr(dec.cursor)
106}
107
108func (dec *Decoder) getFloat() (float64, error) {
109 var end = dec.cursor

Callers 2

decodeFloat64Method · 0.95
decodeFloat64NullMethod · 0.95

Calls 3

readMethod · 0.95
getFloatMethod · 0.95
raiseInvalidJSONErrMethod · 0.95

Tested by

no test coverage detected