be less pessimistic about errors

This commit is contained in:
Alexander Weinhold 2017-08-08 23:48:56 +02:00
parent fb3a698210
commit ddd2bacbae

View File

@ -149,7 +149,6 @@ func Fetch(p *Parameters) ([]*mail.Message, []error) {
func FetchPlaintext(p *Parameters) ([]string, []error) {
mails, errs := Fetch(p)
mailsPlain := make([]string, 0)
if len(errs) == 0 {
for _, mail := range mails {
// check for mime parts
parts, pErrs := getPlainParts(mail)
@ -160,6 +159,5 @@ func FetchPlaintext(p *Parameters) ([]string, []error) {
m := fmt.Sprintf("Date: %s\nFrom: %s\nSubject: %s\n\n%s", date, from, subject, strings.Join(parts, "\n\n"))
mailsPlain = append(mailsPlain, m)
}
}
return mailsPlain, errs
}