Skip to content

Commit

Permalink
replace ioutil.ReadAll with io.ReadAll
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneli authored and Nikola Knezevic committed Sep 25, 2023
1 parent 0634cc1 commit ce7c0c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions compress/gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ package compress

import (
"bytes"
"io"
"sync"

"github.com/klauspost/compress/gzip"
"github.com/xitongsys/parquet-go/parquet"
"io/ioutil"
"sync"
)

var gzipWriterPool sync.Pool
Expand All @@ -34,7 +35,7 @@ func init() {
Uncompress: func(buf []byte) (i []byte, err error) {
rbuf := bytes.NewReader(buf)
gzipReader, _ := gzip.NewReader(rbuf)
res, err := ioutil.ReadAll(gzipReader)
res, err := io.ReadAll(gzipReader)
return res, err
},
}
Expand Down
4 changes: 2 additions & 2 deletions compress/lz4.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package compress

import (
"bytes"
"io/ioutil"
"io"
"sync"

"github.com/pierrec/lz4/v4"
Expand All @@ -32,7 +32,7 @@ func init() {
Uncompress: func(buf []byte) (i []byte, err error) {
rbuf := bytes.NewReader(buf)
lz4Reader := lz4.NewReader(rbuf)
res, err := ioutil.ReadAll(lz4Reader)
res, err := io.ReadAll(lz4Reader)
return res, err
},
}
Expand Down

0 comments on commit ce7c0c3

Please sign in to comment.