summaryrefslogtreecommitdiff
path: root/lib.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib.go')
-rw-r--r--lib.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib.go b/lib.go
index 7f388e0..685571c 100644
--- a/lib.go
+++ b/lib.go
@@ -18,7 +18,6 @@ import (
"encoding/xml"
"fmt"
"io"
- "io/ioutil"
"math/big"
"os"
"regexp"
@@ -73,7 +72,7 @@ func (f *File) ReadZipReader(r *zip.Reader) (map[string][]byte, int, error) {
// unzipToTemp unzip the zip entity to the system temporary directory and
// returned the unzipped file path.
func (f *File) unzipToTemp(zipFile *zip.File) (string, error) {
- tmp, err := ioutil.TempFile(os.TempDir(), "excelize-")
+ tmp, err := os.CreateTemp(os.TempDir(), "excelize-")
if err != nil {
return "", err
}
@@ -111,7 +110,7 @@ func (f *File) readBytes(name string) []byte {
if err != nil {
return content
}
- content, _ = ioutil.ReadAll(file)
+ content, _ = io.ReadAll(file)
f.Pkg.Store(name, content)
_ = file.Close()
return content