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

Function syntaxError

json/codec.go:1012–1022  ·  view source on GitHub ↗
(b []byte, msg string, args ...any)

Source from the content-addressed store, hash-verified

1010}
1011
1012func syntaxError(b []byte, msg string, args ...any) error {
1013 e := new(SyntaxError)
1014 i := syntaxErrorMsgOffset
1015 if i != ^uintptr(0) {
1016 s := "json: " + fmt.Sprintf(msg, args...) + ": " + prefix(b)
1017 p := unsafe.Pointer(e)
1018 // Hack to set the unexported `msg` field.
1019 *(*string)(unsafe.Pointer(uintptr(p) + i)) = s
1020 }
1021 return e
1022}
1023
1024func objectKeyError(b []byte, err error) ([]byte, error) {
1025 if len(b) == 0 {

Callers 15

unexpectedEOFFunction · 0.85
objectKeyErrorFunction · 0.85
parseIntMethod · 0.85
parseUintMethod · 0.85
parseUintHexMethod · 0.85
parseNullMethod · 0.85
parseTrueMethod · 0.85
parseFalseMethod · 0.85
parseNumberMethod · 0.85
parseUnicodeMethod · 0.85
parseStringMethod · 0.85
parseStringUnquoteMethod · 0.85

Calls 1

prefixFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…