mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-06-04 13:10:20 +08:00
fix golint issues in rest (#529)
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
const gzipEncoding = "gzip"
|
||||
|
||||
// GunzipHandler returns a middleware to gunzip http request body.
|
||||
func GunzipHandler(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if strings.Contains(r.Header.Get(httpx.ContentEncoding), gzipEncoding) {
|
||||
|
||||
Reference in New Issue
Block a user