chore: golangci-lint update.

This commit is contained in:
Xavier Michelon
2024-07-11 11:14:23 +02:00
parent 5d3f084a2b
commit fc64dbec59
33 changed files with 157 additions and 158 deletions

View File

@ -241,7 +241,7 @@ func collectAttachments(p *parser.Parser) ([]Attachment, error) {
return nil
}).
RegisterContentTypeHandler("text/.*", func(p *parser.Part) error {
RegisterContentTypeHandler("text/.*", func(_ *parser.Part) error {
return nil
}).
RegisterDefaultHandler(func(p *parser.Part) error {
@ -317,14 +317,14 @@ func collectBodyParts(p *parser.Parser, preferredContentType string) (parser.Par
return bestChoice(childParts, preferredContentType), nil
}).
RegisterRule("text/plain", func(p *parser.Part, visit parser.Visit) (interface{}, error) {
RegisterRule("text/plain", func(p *parser.Part, _ parser.Visit) (interface{}, error) {
if p.IsAttachment() {
return parser.Parts{}, nil
}
return parser.Parts{p}, nil
}).
RegisterRule("text/html", func(p *parser.Part, visit parser.Visit) (interface{}, error) {
RegisterRule("text/html", func(p *parser.Part, _ parser.Visit) (interface{}, error) {
if p.IsAttachment() {
return parser.Parts{}, nil
}
@ -404,7 +404,7 @@ func determineBodyMIMEType(p *parser.Parser) (string, error) {
var isHTML bool
w := p.NewWalker().
RegisterContentTypeHandler("text/html", func(p *parser.Part) (err error) {
RegisterContentTypeHandler("text/html", func(_ *parser.Part) (err error) {
isHTML = true
return
})