mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
chore: upgraded golangci-lint v1.52.2 and fixed all issues.
This commit is contained in:
@ -92,11 +92,7 @@ func buildSimpleRFC822(kr *crypto.KeyRing, msg proton.Message, opts JobOptions,
|
||||
return err
|
||||
}
|
||||
|
||||
if err := w.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return w.Close()
|
||||
}
|
||||
|
||||
func buildMultipartRFC822(
|
||||
@ -148,11 +144,7 @@ func buildMultipartRFC822(
|
||||
}
|
||||
}
|
||||
|
||||
if err := w.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return w.Close()
|
||||
}
|
||||
|
||||
func writeTextPart(
|
||||
@ -319,11 +311,7 @@ func buildPGPMIMEFallbackRFC822(msg proton.Message, opts JobOptions, buf *bytes.
|
||||
return err
|
||||
}
|
||||
|
||||
if err := w.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return w.Close()
|
||||
}
|
||||
|
||||
func writeMultipartSignedRFC822(header message.Header, body []byte, sig proton.Signature, buf *bytes.Buffer) error {
|
||||
@ -379,11 +367,7 @@ func writeMultipartSignedRFC822(header message.Header, body []byte, sig proton.S
|
||||
return err
|
||||
}
|
||||
|
||||
if err := mw.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return mw.Close()
|
||||
}
|
||||
|
||||
func writeMultipartEncryptedRFC822(header message.Header, body []byte, buf *bytes.Buffer) error {
|
||||
|
||||
@ -673,7 +673,7 @@ func TestParsePanic(t *testing.T) {
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
func TestParseTextPlainWithPdfttachmentCyrillic(t *testing.T) {
|
||||
func TestParseTextPlainWithPdfAttachmentCyrillic(t *testing.T) {
|
||||
f := getFileReader("text_plain_pdf_attachment_cyrillic.eml")
|
||||
|
||||
m, err := Parse(f)
|
||||
@ -718,6 +718,6 @@ func getFileReader(filename string) io.Reader {
|
||||
|
||||
type panicReader struct{}
|
||||
|
||||
func (panicReader) Read(p []byte) (int, error) {
|
||||
func (panicReader) Read(_ []byte) (int, error) {
|
||||
panic("lol")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user