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:
dependabot[bot]
2023-09-05 11:14:17 +00:00
committed by Ralf Haferkamp
parent 68e846d0ee
commit 3f40a42bb2
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ type ContentType int
// ContentTypes handled by this package.
const (
ContentTypeUnknown = iota
ContentTypeUnknown ContentType = iota
ContentTypePlainText
ContentTypeHTML
ContentTypeJSON
+2 -2
View File
@@ -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{}) {