mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-12 11:40:28 +08:00
make lint happy
This commit is contained in:
5
docx.go
5
docx.go
@@ -27,6 +27,7 @@ import (
|
|||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"io"
|
"io"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -156,8 +157,8 @@ func (f *Docx) WriteTo(writer io.Writer) (_ int64, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Read is a fake function and cannot be used
|
// Read is a fake function and cannot be used
|
||||||
func (f *Docx) Read(p []byte) (n int, err error) {
|
func (f *Docx) Read(_ []byte) (int, error) {
|
||||||
panic("fake stub!")
|
return 0, os.ErrInvalid
|
||||||
}
|
}
|
||||||
|
|
||||||
// UseTemplate will replace template files
|
// UseTemplate will replace template files
|
||||||
|
|||||||
2
pack.go
2
pack.go
@@ -79,7 +79,7 @@ type marshaller struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Read is fake and is to trigger io.WriterTo
|
// Read is fake and is to trigger io.WriterTo
|
||||||
func (m marshaller) Read(p []byte) (n int, err error) {
|
func (m marshaller) Read(_ []byte) (int, error) {
|
||||||
return 0, os.ErrInvalid
|
return 0, os.ErrInvalid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ type WordprocessingGroup struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UnmarshalXML ...
|
// UnmarshalXML ...
|
||||||
func (w *WordprocessingGroup) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
func (w *WordprocessingGroup) UnmarshalXML(d *xml.Decoder, _ xml.StartElement) error {
|
||||||
for {
|
for {
|
||||||
t, err := d.Token()
|
t, err := d.Token()
|
||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
@@ -113,7 +113,7 @@ type WPGcNvGrpSpPr struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UnmarshalXML ...
|
// UnmarshalXML ...
|
||||||
func (w *WPGcNvGrpSpPr) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
func (w *WPGcNvGrpSpPr) UnmarshalXML(d *xml.Decoder, _ xml.StartElement) error {
|
||||||
for {
|
for {
|
||||||
t, err := d.Token()
|
t, err := d.Token()
|
||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
@@ -160,7 +160,7 @@ type WPGGroupShape struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UnmarshalXML ...
|
// UnmarshalXML ...
|
||||||
func (w *WPGGroupShape) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
func (w *WPGGroupShape) UnmarshalXML(d *xml.Decoder, _ xml.StartElement) error {
|
||||||
for {
|
for {
|
||||||
t, err := d.Token()
|
t, err := d.Token()
|
||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ func (r *Text) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
|
|||||||
type RunMergeRule func(r1, r2 *Run) bool
|
type RunMergeRule func(r1, r2 *Run) bool
|
||||||
|
|
||||||
// MergeAllRuns ...
|
// MergeAllRuns ...
|
||||||
func MergeAllRuns(r1, r2 *Run) bool {
|
func MergeAllRuns(_, _ *Run) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user