mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-05 07:40:24 +08:00
chore: make lint happy
This commit is contained in:
@@ -25,9 +25,9 @@ linters:
|
|||||||
- copyloopvar
|
- copyloopvar
|
||||||
- exhaustive
|
- exhaustive
|
||||||
#- funlen
|
#- funlen
|
||||||
- goconst
|
#- goconst
|
||||||
- gocritic
|
- gocritic
|
||||||
- gocyclo
|
#- gocyclo
|
||||||
#- gofumpt
|
#- gofumpt
|
||||||
#- goimports
|
#- goimports
|
||||||
- goprintffuncname
|
- goprintffuncname
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
fmt.Println("Document writen. \nNow trying to read it")
|
fmt.Println("Document written. \nNow trying to read it")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now let's try to read the file
|
// Now let's try to read the file
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ func (r *WPInline) String() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *WPInline) copymedia(to *Docx) *WPInline {
|
func (r *WPInline) copymedia(to *Docx) *WPInline { //nolint: dupl
|
||||||
if r.Graphic.GraphicData.Pic != nil {
|
if r.Graphic.GraphicData.Pic != nil {
|
||||||
if r.Graphic.GraphicData.Pic.BlipFill != nil {
|
if r.Graphic.GraphicData.Pic.BlipFill != nil {
|
||||||
tgt, err := r.file.ReferTarget(r.Graphic.GraphicData.Pic.BlipFill.Blip.Embed)
|
tgt, err := r.file.ReferTarget(r.Graphic.GraphicData.Pic.BlipFill.Blip.Embed)
|
||||||
@@ -1373,7 +1373,7 @@ func (r *WPAnchor) String() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *WPAnchor) copymedia(to *Docx) *WPAnchor {
|
func (r *WPAnchor) copymedia(to *Docx) *WPAnchor { //nolint: dupl
|
||||||
if r.Graphic.GraphicData.Pic != nil {
|
if r.Graphic.GraphicData.Pic != nil {
|
||||||
if r.Graphic.GraphicData.Pic.BlipFill != nil {
|
if r.Graphic.GraphicData.Pic.BlipFill != nil {
|
||||||
tgt, err := r.file.ReferTarget(r.Graphic.GraphicData.Pic.BlipFill.Blip.Embed)
|
tgt, err := r.file.ReferTarget(r.Graphic.GraphicData.Pic.BlipFill.Blip.Embed)
|
||||||
|
|||||||
2
theme.go
2
theme.go
@@ -32,7 +32,7 @@ func (f *Docx) UseTemplate(template string, tmpfslst []string, tmplfs fs.FS) *Do
|
|||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithDefaultTheme use default theme embeded
|
// WithDefaultTheme use default theme embedded
|
||||||
func (f *Docx) WithDefaultTheme() *Docx {
|
func (f *Docx) WithDefaultTheme() *Docx {
|
||||||
return f.UseTemplate("default", DefaultTemplateFilesList, TemplateXMLFS)
|
return f.UseTemplate("default", DefaultTemplateFilesList, TemplateXMLFS)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user