1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-11 02:50:27 +08:00

make lint happy

This commit is contained in:
源文雨
2023-02-23 14:34:44 +08:00
parent 59cce024f7
commit fa053fefd4
13 changed files with 350 additions and 170 deletions

View File

@@ -2,14 +2,14 @@ package docxlib
// AddParagraph adds a new paragraph
func (f *Docx) AddParagraph() *Paragraph {
p := &Paragraph{
f.Document.Body.mu.Lock()
defer f.Document.Body.mu.Unlock()
f.Document.Body.Paragraphs = append(f.Document.Body.Paragraphs, Paragraph{
Children: make([]interface{}, 0, 64),
file: f,
}
})
f.Document.Body.Paragraphs = append(f.Document.Body.Paragraphs, p)
return p
return &f.Document.Body.Paragraphs[len(f.Document.Body.Paragraphs)-1]
}
// Justification allows to set para's horizonal alignment