提交 4e4baac3 编写于 作者: xurime's avatar xurime

using Mutex lock and update benchmark

上级 bc704c85
......@@ -31,7 +31,7 @@ import (
// File define a populated spreadsheet file struct.
type File struct {
sync.RWMutex
sync.Mutex
xmlAttr map[string][]xml.Attr
checked map[string]bool
sheetMap map[string]string
......
......@@ -19,7 +19,7 @@ func BenchmarkWrite(b *testing.B) {
if err != nil {
b.Error(err)
}
if err := f.SetCellDefault("Sheet1", val, s); err != nil {
if err := f.SetCellValue("Sheet1", val, s); err != nil {
b.Error(err)
}
}
......
......@@ -19,7 +19,7 @@ import (
// xlsxWorksheet directly maps the worksheet element in the namespace
// http://schemas.openxmlformats.org/spreadsheetml/2006/main.
type xlsxWorksheet struct {
sync.RWMutex
sync.Mutex
XMLName xml.Name `xml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main worksheet"`
SheetPr *xlsxSheetPr `xml:"sheetPr"`
Dimension *xlsxDimension `xml:"dimension"`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册