diff options
author | xuri <xuri.me@gmail.com> | 2021-07-04 12:13:06 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-07-04 12:13:06 +0800 |
commit | 0e02329bedf6648259fd219642bb907bdb07fd21 (patch) | |
tree | 16551d2174313dad46c3e276a6e27ffee5213bda /excelize.go | |
parent | 5ec61310dc55c9af93d66e6d225f721738416d1f (diff) |
This closes #861, support concurrency get cell picture and remove unused internal function `getSheetNameByID`
Diffstat (limited to 'excelize.go')
-rw-r--r-- | excelize.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/excelize.go b/excelize.go index 940acf1..66cfd00 100644 --- a/excelize.go +++ b/excelize.go @@ -39,7 +39,7 @@ type File struct { CalcChain *xlsxCalcChain Comments map[string]*xlsxComments ContentTypes *xlsxTypes - Drawings map[string]*xlsxWsDr + Drawings sync.Map Path string SharedStrings *xlsxSST sharedStringsMap map[string]int @@ -50,7 +50,7 @@ type File struct { DecodeVMLDrawing map[string]*decodeVmlDrawing VMLDrawing map[string]*vmlDrawing WorkBook *xlsxWorkbook - Relationships map[string]*xlsxRelationships + Relationships sync.Map XLSX map[string][]byte CharsetReader charsetTranscoderFn } @@ -93,12 +93,12 @@ func newFile() *File { checked: make(map[string]bool), sheetMap: make(map[string]string), Comments: make(map[string]*xlsxComments), - Drawings: make(map[string]*xlsxWsDr), + Drawings: sync.Map{}, sharedStringsMap: make(map[string]int), Sheet: make(map[string]*xlsxWorksheet), DecodeVMLDrawing: make(map[string]*decodeVmlDrawing), VMLDrawing: make(map[string]*vmlDrawing), - Relationships: make(map[string]*xlsxRelationships), + Relationships: sync.Map{}, CharsetReader: charset.NewReaderLabel, } } @@ -277,7 +277,7 @@ func (f *File) addRels(relPath, relType, target, targetMode string) int { Target: target, TargetMode: targetMode, }) - f.Relationships[relPath] = rels + f.Relationships.Store(relPath, rels) return rID } |