Fix error variable declaration in eml.go

The error variable declaration has been corrected from "if err := parseEML(...)" to "if err = parseEML(...)". This change ensures consistency with the rest of the error handling code in the file.
This commit is contained in:
Winni Neessen 2024-10-24 13:20:09 +02:00
parent 7ed23bf01b
commit 127cfdf2bc
Signed by: wneessen
GPG key ID: 385AC9889632126E

2
eml.go
View file

@ -60,7 +60,7 @@ func EMLToMsgFromReader(reader io.Reader) (*Msg, error) {
return msg, fmt.Errorf("failed to parse EML from reader: %w", err)
}
if err := parseEML(parsedMsg, bodybuf, msg); err != nil {
if err = parseEML(parsedMsg, bodybuf, msg); err != nil {
return msg, fmt.Errorf("failed to parse EML contents: %w", err)
}