MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / findDecimalTerminator

Function findDecimalTerminator

pkg/util/encoding/decimal.go:386–391  ·  view source on GitHub ↗

findDecimalTerminator finds the decimalTerminator in the given slice.

(buf []byte)

Source from the content-addressed store, hash-verified

384
385// findDecimalTerminator finds the decimalTerminator in the given slice.
386func findDecimalTerminator(buf []byte) (int, error) {
387 if idx := bytes.IndexByte(buf, decimalTerminator); idx != -1 {
388 return idx, nil
389 }
390 return -1, errors.Errorf("did not find terminator %#x in buffer %#x", decimalTerminator, buf)
391}
392
393func decodeSmallNumber(
394 negative bool, buf []byte, tmp []byte,

Callers 4

getDecimalLenFunction · 0.85
decodeSmallNumberFunction · 0.85
decodeMediumNumberFunction · 0.85
decodeLargeNumberFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…