Bump github.com/go-chi/render from 1.0.2 to 1.0.3
Bumps [github.com/go-chi/render](https://github.com/go-chi/render) from 1.0.2 to 1.0.3. - [Commits](https://github.com/go-chi/render/compare/v1.0.2...v1.0.3) --- updated-dependencies: - dependency-name: github.com/go-chi/render dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Ralf Haferkamp
parent
68e846d0ee
commit
3f40a42bb2
+2
-2
@@ -99,14 +99,14 @@ func JSON(w http.ResponseWriter, r *http.Request, v interface{}) {
|
||||
return
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
if status, ok := r.Context().Value(StatusCtxKey).(int); ok {
|
||||
w.WriteHeader(status)
|
||||
}
|
||||
w.Write(buf.Bytes()) //nolint:errcheck
|
||||
}
|
||||
|
||||
// XML marshals 'v' to JSON, setting the Content-Type as application/xml. It
|
||||
// XML marshals 'v' to XML, setting the Content-Type as application/xml. It
|
||||
// will automatically prepend a generic XML header (see encoding/xml.Header) if
|
||||
// one is not found in the first 100 bytes of 'v'.
|
||||
func XML(w http.ResponseWriter, r *http.Request, v interface{}) {
|
||||
|
||||
Reference in New Issue
Block a user