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