MCPcopy Create free account
hub / github.com/pace/bricks / Error

Method Error

http/jsonapi/request.go:48–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48func (eupt ErrUnsupportedPtrType) Error() string {
49 typeName := eupt.t.Elem().Name()
50 kind := eupt.t.Elem().Kind()
51 if kind.String() != "" && kind.String() != typeName {
52 typeName = fmt.Sprintf("%s (%s)", typeName, kind.String())
53 }
54 return fmt.Sprintf(
55 "jsonapi: Can't unmarshal %+v (%s) to struct field `%s`, which is a pointer to `%s`",
56 eupt.rf, eupt.rf.Type().Kind(), eupt.structField.Name, typeName,
57 )
58}
59
60func newErrUnsupportedPtrType(rf reflect.Value, t reflect.Type, structField reflect.StructField) error {
61 return ErrUnsupportedPtrType{rf, t, structField}

Callers

nothing calls this directly

Calls 3

NameMethod · 0.80
TypeMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected