MCPcopy Create free account
hub / github.com/segmentio/encoding / init

Function init

json/codec.go:1003–1010  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1001var syntaxErrorMsgOffset = ^uintptr(0)
1002
1003func init() {
1004 t := reflect.TypeOf(SyntaxError{})
1005 for i := range t.NumField() {
1006 if f := t.Field(i); f.Type.Kind() == reflect.String {
1007 syntaxErrorMsgOffset = f.Offset
1008 }
1009 }
1010}
1011
1012func syntaxError(b []byte, msg string, args ...any) error {
1013 e := new(SyntaxError)

Callers

nothing calls this directly

Calls 3

NumFieldMethod · 0.65
FieldMethod · 0.65
KindMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…