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 --- rows.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'rows.go') diff --git a/rows.go b/rows.go index 2960aa4..1fd6825 100644 --- a/rows.go +++ b/rows.go @@ -16,7 +16,6 @@ import ( "encoding/xml" "fmt" "io" - "io/ioutil" "log" "math" "os" @@ -296,7 +295,7 @@ func (f *File) getFromStringItem(index int) string { defer tempFile.Close() } f.sharedStringItem = [][]uint{} - f.sharedStringTemp, _ = ioutil.TempFile(os.TempDir(), "excelize-") + f.sharedStringTemp, _ = os.CreateTemp(os.TempDir(), "excelize-") f.tempFiles.Store(defaultTempFileSST, f.sharedStringTemp.Name()) var ( inElement string -- cgit v1.2.1