1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-05 07:40:24 +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

@@ -3,6 +3,7 @@ package docxlib
import (
"encoding/xml"
"io"
"strings"
)
// Hyperlink element contains links
@@ -25,9 +26,10 @@ func (r *Hyperlink) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
switch tt := t.(type) {
case xml.StartElement:
if tt.Name.Local == "r" {
d.DecodeElement(&r.Run, &tt)
} else {
continue
err = d.DecodeElement(&r.Run, &tt)
if err != nil && !strings.HasPrefix(err.Error(), "expected") {
return err
}
}
}