summaryrefslogtreecommitdiff
path: root/sheet.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-10-13 00:02:53 +0800
committerxuri <xuri.me@gmail.com>2022-10-13 00:13:36 +0800
commit7363c1e3337c5f0d9c70cc8af7504b3f8c092ab4 (patch)
treeafe4236975d8144d0ffdd55fef7723b2a0295495 /sheet.go
parent0e657c887bf505d62ce3bf685c518cd0ed7bc558 (diff)
Go 1.16 and later required, migration of deprecation package `ioutil`
- Improving performance for stream writer `SetRow` function, reduces memory usage over and speedup about 19% - Update dependencies module - Update GitHub workflow
Diffstat (limited to 'sheet.go')
-rw-r--r--sheet.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/sheet.go b/sheet.go
index 71123d7..ecd39f0 100644
--- a/sheet.go
+++ b/sheet.go
@@ -17,7 +17,6 @@ import (
"encoding/xml"
"fmt"
"io"
- "io/ioutil"
"log"
"os"
"path"
@@ -479,7 +478,7 @@ func (f *File) SetSheetBackground(sheet, picture string) error {
if !ok {
return ErrImgExt
}
- file, _ := ioutil.ReadFile(filepath.Clean(picture))
+ file, _ := os.ReadFile(filepath.Clean(picture))
name := f.addMedia(file, ext)
sheetXMLPath, _ := f.getSheetXMLPath(sheet)
sheetRels := "xl/worksheets/_rels/" + strings.TrimPrefix(sheetXMLPath, "xl/worksheets/") + ".rels"