Other: Update golangci-lint to v1.50.0
This commit is contained in:
@ -24,10 +24,11 @@
|
||||
// When IMAP clients request message literals (or parts thereof), we sometimes need to build RFC822 message literals.
|
||||
// To do this, we pass build jobs to the message builder, which internally manages its own parallelism.
|
||||
// Summary:
|
||||
// - each IMAP fetch request is handled in parallel,
|
||||
// - within each IMAP fetch request, individual items are handled by a pool of `fetchWorkers` workers,
|
||||
// - within each worker, build jobs are posted to the message builder,
|
||||
// - the message builder handles build jobs using its own, independent worker pool,
|
||||
// - each IMAP fetch request is handled in parallel,
|
||||
// - within each IMAP fetch request, individual items are handled by a pool of `fetchWorkers` workers,
|
||||
// - within each worker, build jobs are posted to the message builder,
|
||||
// - the message builder handles build jobs using its own, independent worker pool,
|
||||
//
|
||||
// The builder will handle jobs in parallel up to its own internal limit. This prevents it from overwhelming API.
|
||||
package imap
|
||||
|
||||
|
||||
@ -31,15 +31,16 @@ const (
|
||||
|
||||
// addToCache adds item to existing item list.
|
||||
// Starting from following structure:
|
||||
// {
|
||||
// "username": {"label": "item1;item2"}
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// "username": {"label": "item1;item2"}
|
||||
// }
|
||||
//
|
||||
// After calling addToCache("username", "label", "newItem") we get:
|
||||
// {
|
||||
// "username": {"label": "item1;item2;newItem"}
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// "username": {"label": "item1;item2;newItem"}
|
||||
// }
|
||||
func (ib *imapBackend) addToCache(userID, label, toAdd string) {
|
||||
list := ib.getCacheList(userID, label)
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/mail"
|
||||
"strings"
|
||||
"time"
|
||||
@ -55,7 +55,7 @@ func (im *imapMailbox) createMessage(imapFlags []string, date time.Time, r imap.
|
||||
im.user.appendExpungeLock.Lock()
|
||||
defer im.user.appendExpungeLock.Unlock()
|
||||
|
||||
body, err := ioutil.ReadAll(r)
|
||||
body, err := io.ReadAll(r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -30,11 +30,11 @@ import (
|
||||
// The purpose of this mailbox is to see "Folders" and "Labels"
|
||||
// at the root of the mailbox tree, e.g.:
|
||||
//
|
||||
// Folders << this
|
||||
// Folders/Family
|
||||
// Folders << this
|
||||
// Folders/Family
|
||||
//
|
||||
// Labels << this
|
||||
// Labels/Security
|
||||
// Labels << this
|
||||
// Labels/Security
|
||||
//
|
||||
// This mailbox cannot be modified or read in any way.
|
||||
type imapRootMailbox struct {
|
||||
|
||||
@ -18,8 +18,8 @@
|
||||
// Package uidplus DOES NOT implement full RFC4315!
|
||||
//
|
||||
// Excluded parts are:
|
||||
// * Response `UIDNOTSTICKY`: All mailboxes of Bridge support stable
|
||||
// UIDVALIDITY so it would never return this response
|
||||
// - Response `UIDNOTSTICKY`: All mailboxes of Bridge support stable
|
||||
// UIDVALIDITY so it would never return this response
|
||||
//
|
||||
// Otherwise the standard RFC4315 is followed.
|
||||
package uidplus
|
||||
@ -48,9 +48,10 @@ const (
|
||||
// ranges or out of the bound ranges are possible.
|
||||
//
|
||||
// NOTE: potential issue with response length
|
||||
// * the user selects large number of messages to be copied and the
|
||||
// response line will be long,
|
||||
// * list of UIDs which high values
|
||||
// - the user selects large number of messages to be copied and the
|
||||
// response line will be long,
|
||||
// - list of UIDs which high values
|
||||
//
|
||||
// which can create long response line. We didn't find a maximum length of one
|
||||
// IMAP response line or maximum length of IMAP "response code" with parameters.
|
||||
type OrderedSeq []uint32
|
||||
|
||||
Reference in New Issue
Block a user