@@ -69,24 +69,23 @@ func newErrUnsupportedPtrType(rf reflect.Value, t reflect.Type, structField refl
69
69
// For example you could pass it, in, req.Body and, model, a BlogPost
70
70
// struct instance to populate in an http handler,
71
71
//
72
- // func CreateBlog(w http.ResponseWriter, r *http.Request) {
73
- // blog := new(Blog)
72
+ // func CreateBlog(w http.ResponseWriter, r *http.Request) {
73
+ // blog := new(Blog)
74
74
//
75
- // if err := jsonapi.UnmarshalPayload(r.Body, blog); err != nil {
76
- // http.Error(w, err.Error(), 500)
77
- // return
78
- // }
75
+ // if err := jsonapi.UnmarshalPayload(r.Body, blog); err != nil {
76
+ // http.Error(w, err.Error(), 500)
77
+ // return
78
+ // }
79
79
//
80
- // // ...do stuff with your blog...
80
+ // // ...do stuff with your blog...
81
81
//
82
- // w.Header().Set("Content-Type", jsonapi.MediaType)
83
- // w.WriteHeader(201)
84
- //
85
- // if err := jsonapi.MarshalPayload(w, blog); err != nil {
86
- // http.Error(w, err.Error(), 500)
87
- // }
88
- // }
82
+ // w.Header().Set("Content-Type", jsonapi.MediaType)
83
+ // w.WriteHeader(201)
89
84
//
85
+ // if err := jsonapi.MarshalPayload(w, blog); err != nil {
86
+ // http.Error(w, err.Error(), 500)
87
+ // }
88
+ // }
90
89
//
91
90
// Visit https://github.com/google/jsonapi#create for more info.
92
91
//
0 commit comments