From c3e92a51d744bc8420e0626b06ee3a0efd030341 Mon Sep 17 00:00:00 2001 From: xuri Date: Fri, 14 Aug 2020 16:09:50 +0000 Subject: Compatible with Go 1.15, fix unit test failed on Windows and fixed #689 potential race condition --- xmlWorksheet.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xmlWorksheet.go') diff --git a/xmlWorksheet.go b/xmlWorksheet.go index 7cd73c4..2b39e64 100644 --- a/xmlWorksheet.go +++ b/xmlWorksheet.go @@ -11,11 +11,15 @@ package excelize -import "encoding/xml" +import ( + "encoding/xml" + "sync" +) // xlsxWorksheet directly maps the worksheet element in the namespace // http://schemas.openxmlformats.org/spreadsheetml/2006/main. type xlsxWorksheet struct { + sync.RWMutex XMLName xml.Name `xml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main worksheet"` SheetPr *xlsxSheetPr `xml:"sheetPr"` Dimension *xlsxDimension `xml:"dimension"` -- cgit v1.2.1