~rockorager/go-jmap

43e0f0f469184f178626e0b96f086a40423e28dd — Tim Culverhouse 1 year, 3 months ago f6efa21
fix: change all time.Time to pointers

Change all time.Time references to pointers so their 0 value is nil

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
3 files changed, 4 insertions(+), 4 deletions(-)

M mail/email/email.go
M mail/email/import.go
M mail/emailsubmission/emailsubmission.go
M mail/email/email.go => mail/email/email.go +2 -2
@@ 56,7 56,7 @@ type Email struct {
	// internal date in IMAP [@?RFC3501].
	//
	// immutable
	ReceivedAt time.Time `json:"receivedAt,omitempty"`
	ReceivedAt *time.Time `json:"receivedAt,omitempty"`

	// This is a list of all header fields [@!RFC5322], in the same order
	// they appear in the message.


@@ 121,7 121,7 @@ type Email struct {
	// The value is identical to the value of header:Date:asDate.
	//
	// immutable
	SentAt time.Time `json:"sentAt,omitempty"`
	SentAt *time.Time `json:"sentAt,omitempty"`

	// This is the full MIME structure of the message body, without
	// recursing into message/rfc822 or message/global parts. Note that

M mail/email/import.go => mail/email/import.go +1 -1
@@ 42,7 42,7 @@ type EmailImport struct {
	Keywords map[string]bool `json:"keywords,omitempty"`

	// The "receivedAt" date to set on the Email. The value must be in UTC
	ReceivedAt time.Time `json:"receivedAt,omitempty"`
	ReceivedAt *time.Time `json:"receivedAt,omitempty"`
}

type ImportResponse struct {

M mail/emailsubmission/emailsubmission.go => mail/emailsubmission/emailsubmission.go +1 -1
@@ 64,7 64,7 @@ type EmailSubmission struct {
	// The date the submission was/will be released for delivery
	//
	// immutable;server-set
	SendAt time.Time `json:"sendAt,omitempty"`
	SendAt *time.Time `json:"sendAt,omitempty"`

	// A status indicating if the send can be undone. One of:
	// - "pending": it may be possible to cancel