From e30bd324a3552fae3089110d39b61ddced66ddee Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Fri, 18 Mar 2022 09:53:02 +0100 Subject: go vet: composite literal uses unkeyed fields This commit fixes all occurrences of the abovementioned lint-error in the codebase. Signed-off-by: Moritz Poldrack Acked-by: Robin Jarry --- worker/lib/parse.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'worker/lib/parse.go') diff --git a/worker/lib/parse.go b/worker/lib/parse.go index 6d73a1f5..1c0e413c 100644 --- a/worker/lib/parse.go +++ b/worker/lib/parse.go @@ -236,7 +236,7 @@ func MessageInfo(raw RawMessage) (*models.MessageInfo, error) { } else if err != nil { return nil, fmt.Errorf("could not get structure: %v", err) } - h := &mail.Header{msg.Header} + h := &mail.Header{Header: msg.Header} env, err := parseEnvelope(h) if err != nil && !errors.Is(err, DateParseError) { return nil, fmt.Errorf("could not parse envelope: %v", err) @@ -265,7 +265,7 @@ func MessageInfo(raw RawMessage) (*models.MessageInfo, error) { Flags: flags, Labels: labels, InternalDate: recDate, - RFC822Headers: &mail.Header{msg.Header}, + RFC822Headers: &mail.Header{Header: msg.Header}, Size: 0, Uid: raw.UID(), Error: parseErr, -- cgit