mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 07:36:44 +00:00
chore: upgraded golangci-lint v1.52.2 and fixed all issues.
This commit is contained in:
@ -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])
|
||||
|
||||
Reference in New Issue
Block a user