fix: lint errors
This commit was merged in pull request #130.
This commit is contained in:
@@ -2,6 +2,7 @@ package middleware
|
||||
|
||||
import (
|
||||
"compress/gzip"
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
@@ -32,8 +33,7 @@ func Gzip(next http.Handler) http.Handler {
|
||||
next.ServeHTTP(wrapper, r)
|
||||
|
||||
err := gz.Close()
|
||||
if err != nil && err != http.ErrBodyNotAllowed {
|
||||
// if err != nil {
|
||||
if err != nil && !errors.Is(err, http.ErrBodyNotAllowed) {
|
||||
log.Error("Gzip: could not close Writer: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user