MCPcopy Index your code
hub / github.com/segmentio/encoding / inputError

Method inputError

json/decode.go:1515–1524  ·  view source on GitHub ↗
(b []byte, t reflect.Type)

Source from the content-addressed store, hash-verified

1513}
1514
1515func (d decoder) inputError(b []byte, t reflect.Type) ([]byte, error) {
1516 if len(b) == 0 {
1517 return nil, unexpectedEOF(b)
1518 }
1519 _, r, _, err := d.parseValue(b)
1520 if err != nil {
1521 return r, err
1522 }
1523 return skipSpaces(r), unmarshalTypeError(b, t)
1524}
1525
1526func decodeInto[T any](dest *any, b []byte, d decoder, fn decodeFunc) ([]byte, error) {
1527 var v T

Callers 15

parseIntMethod · 0.95
parseUintMethod · 0.95
decodeNullMethod · 0.95
decodeBoolMethod · 0.95
decodeFloat32Method · 0.95
decodeFloat64Method · 0.95
decodeNumberMethod · 0.95
decodeStringMethod · 0.95
decodeFromStringMethod · 0.95
decodeFromStringToIntMethod · 0.95
decodeBytesMethod · 0.95
decodeDurationMethod · 0.95

Calls 4

parseValueMethod · 0.95
unexpectedEOFFunction · 0.85
skipSpacesFunction · 0.85
unmarshalTypeErrorFunction · 0.85

Tested by

no test coverage detected