1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-09 01:30:25 +08:00

refactor: Run use Children

This commit is contained in:
源文雨
2023-02-25 21:18:29 +08:00
parent e32b907c6a
commit fafd4c9fc3
14 changed files with 101 additions and 129 deletions

View File

@@ -42,8 +42,6 @@ func (f *Docx) AddTable(row int, col int) *WTable {
TableCells: cells,
}
}
f.Document.Body.mu.Lock()
defer f.Document.Body.mu.Unlock()
f.Document.Body.Items = append(f.Document.Body.Items, WTable{
TableProperties: &WTableProperties{
Width: &WTableWidth{Type: "auto"},
@@ -101,8 +99,6 @@ func (f *Docx) AddTableTwips(rowHeights []int64, colWidths []int64) *WTable {
}
}
}
f.Document.Body.mu.Lock()
defer f.Document.Body.mu.Unlock()
f.Document.Body.Items = append(f.Document.Body.Items, WTable{
TableProperties: &WTableProperties{
Width: &WTableWidth{Type: "auto"},