From 7363c1e3337c5f0d9c70cc8af7504b3f8c092ab4 Mon Sep 17 00:00:00 2001 From: xuri Date: Thu, 13 Oct 2022 00:02:53 +0800 Subject: 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 --- sheet.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sheet.go') 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" -- cgit v1.2.1