Update Go modules to require Go 1.21 and replace ioutil with io package in reader.go

This commit is contained in:
akazwz
2025-09-12 23:52:50 +08:00
parent 41a22f07f2
commit 3d8eef20a6
3 changed files with 5 additions and 2 deletions

View File

@@ -1 +1,3 @@
module github.com/google/brotli/go/brotli
go 1.21

View File

@@ -9,7 +9,6 @@ import (
"bytes"
"errors"
"io"
"io/ioutil"
"strconv"
"unsafe"
)
@@ -127,5 +126,5 @@ func Decode(encodedData []byte) ([]byte, error) {
func DecodeWithRawDictionary(encodedData []byte, dictionary []byte) ([]byte, error) {
r := NewReaderWithOptions(bytes.NewReader(encodedData), ReaderOptions{RawDictionary: dictionary})
defer r.Close()
return ioutil.ReadAll(r)
return io.ReadAll(r)
}

View File

@@ -1 +1,3 @@
module github.com/google/brotli/go/cbrotli
go 1.21