From 90d200a10ba4d8c2ae2eff47ad8e1cca0ab28e76 Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 7 Jul 2021 00:57:43 +0800 Subject: Make the functions `SetSheetRow`, `New Style` and `SetCellStyle` concurrency safety --- xmlStyles.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xmlStyles.go') diff --git a/xmlStyles.go b/xmlStyles.go index 92e4e6a..afdc170 100644 --- a/xmlStyles.go +++ b/xmlStyles.go @@ -11,10 +11,14 @@ package excelize -import "encoding/xml" +import ( + "encoding/xml" + "sync" +) // xlsxStyleSheet is the root element of the Styles part. type xlsxStyleSheet struct { + sync.Mutex XMLName xml.Name `xml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main styleSheet"` NumFmts *xlsxNumFmts `xml:"numFmts,omitempty"` Fonts *xlsxFonts `xml:"fonts,omitempty"` -- cgit v1.2.1