From 0735b256d5f53f58b1a1d9b0f9ec30ae2d0ca701 Mon Sep 17 00:00:00 2001 From: tripg Date: Tue, 4 Apr 2023 16:32:47 +0700 Subject: [PATCH] Fix gzip deflate and update go to 1.20 --- go.mod | 2 +- internal/utils/deflate.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index ef52d06..e5d6a7d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/okieraised/gonii -go 1.18 +go 1.20 require ( github.com/klauspost/pgzip v1.2.5 diff --git a/internal/utils/deflate.go b/internal/utils/deflate.go index 1f77e53..b9c330b 100644 --- a/internal/utils/deflate.go +++ b/internal/utils/deflate.go @@ -15,7 +15,7 @@ func DeflateGzip(b []byte) ([]byte, error) { defer g.Close() p, err := io.ReadAll(g) - if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF { + if err != nil { return nil, err }