chore: upgraded golangci-lint v1.52.2 and fixed all issues.

This commit is contained in:
Xavier Michelon
2023-05-04 21:24:17 +02:00
parent bd47303074
commit b51d85e768
26 changed files with 105 additions and 128 deletions

View File

@ -270,7 +270,7 @@ func (conn *imapConnector) CreateMessage(
mailboxID imap.MailboxID,
literal []byte,
flags imap.FlagSet,
date time.Time,
_ time.Time,
) (imap.Message, []byte, error) {
defer conn.goPollAPIEvents(false)
@ -435,11 +435,11 @@ func (conn *imapConnector) MoveMessages(ctx context.Context, messageIDs []imap.M
var result bool
if v, ok := conn.apiLabels[string(labelFromID)]; ok && v.Type == proton.LabelTypeLabel {
result = result || true
result = true
}
if v, ok := conn.apiLabels[string(labelToID)]; ok && (v.Type == proton.LabelTypeFolder || v.Type == proton.LabelTypeSystem) {
result = result || true
result = true
}
return result
@ -505,7 +505,7 @@ func (conn *imapConnector) GetMailboxVisibility(_ context.Context, mailboxID ima
}
// Close the connector will no longer be used and all resources should be closed/released.
func (conn *imapConnector) Close(ctx context.Context) error {
func (conn *imapConnector) Close(_ context.Context) error {
return nil
}
@ -520,7 +520,7 @@ func (conn *imapConnector) importMessage(
if err := safe.RLockRet(func() error {
return withAddrKR(conn.apiUser, conn.apiAddrs[conn.addrID], conn.vault.KeyPass(), func(_, addrKR *crypto.KeyRing) error {
messageID := ""
var messageID string
if slices.Contains(labelIDs, proton.DraftsLabel) {
msg, err := conn.createDraft(ctx, literal, addrKR, conn.apiAddrs[conn.addrID])