diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-06-08 00:01:44 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-06-08 00:01:44 +0200 |
commit | 6079b1d963f34ada5c4b25363f2319901e283936 (patch) | |
tree | f7f93616eb3dacfcebee486fe7542ec3adfb3950 /pkg/ext/compression.go | |
parent | e9098e00fb6339b759df5b0df2e086cef8a7ce83 (diff) | |
download | cerrado-6079b1d963f34ada5c4b25363f2319901e283936.tar.gz cerrado-6079b1d963f34ada5c4b25363f2319901e283936.tar.bz2 cerrado-6079b1d963f34ada5c4b25363f2319901e283936.zip |
feat: Add error handling
Diffstat (limited to 'pkg/ext/compression.go')
-rw-r--r-- | pkg/ext/compression.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/ext/compression.go b/pkg/ext/compression.go index 92144b8..57ad49a 100644 --- a/pkg/ext/compression.go +++ b/pkg/ext/compression.go @@ -24,7 +24,7 @@ type CompressionResponseWriter struct { compressWriter io.Writer } -func Compress(next func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) { +func Compress(next http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { if accept, ok := r.Header["Accept-Encoding"]; ok { if compress, algo := GetCompressionWriter(u.FirstOrZero(accept), w); algo != "" { |