Update comment in eml.go for parsing multipart messages

The comment in the eml.go file was extended to include the possibility of 'Multipart/alternative' parts. Previously, it only mentioned 'Multipart/related' parts. The actual code functionality remains unchanged, this is purely a clarification in the documentation.
This commit is contained in:
Winni Neessen 2024-06-28 13:28:57 +02:00
parent fcc5209852
commit 0bf3f73e9b
Signed by: wneessen
GPG key ID: 385AC9889632126E

2
eml.go
View file

@ -253,7 +253,7 @@ ReadNextPart:
return fmt.Errorf("failed to get next part of multipart message: %w", err)
}
for err == nil {
// Multipart/related parts need to be parsed seperately
// Multipart/related and Multipart/alternative parts need to be parsed seperately
if contentTypeSlice, ok := multiPart.Header[HeaderContentType.String()]; ok && len(contentTypeSlice) == 1 {
contentType, _ := parseMultiPartHeader(contentTypeSlice[0])
fmt.Printf("CONTENT-TYPE: %s\n", contentType)