We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86c58c9 commit e3e5d38Copy full SHA for e3e5d38
adapter.go
@@ -25,6 +25,9 @@ func CreateJsonAdapter(adapters ...TypeAdapter) JsonAdapter {
25
t := reflect.ValueOf(out).Type()
26
adapter := adapterMap[t]
27
if adapter == nil {
28
+ if t.Kind() != reflect.Ptr {
29
+ return fmt.Errorf("unmarshal expect pointer, actual type is: %s", t)
30
+ }
31
return fmt.Errorf("unknown type: %s", t)
32
}
33
iter := ParseBytes(bytes)
0 commit comments