Update go version

This commit is contained in:
dwrz
2026-08-21 10:23:37 +00:00
parent 78248a6145
commit c2e2d9ea02
466 changed files with 67766 additions and 2881 deletions

View File

@@ -385,6 +385,15 @@ func (c *Client) Mailbox() *SelectedMailbox {
return c.mailbox
}
// Closed returns a channel that is closed when the connection is closed.
//
// This channel cannot be used to reliably determine whether a connection is healthy. If
// the underlying connection times out, the channel will be closed eventually, but not
// immediately. To check whether the connection is healthy, send a command (such as Noop).
func (c *Client) Closed() <-chan struct{} {
return c.decCh
}
// Close immediately closes the connection.
func (c *Client) Close() error {
c.mutex.Lock()
@@ -1080,7 +1089,7 @@ func (c *Client) Subscribe(mailbox string) *Command {
return cmd
}
// Subscribe sends an UNSUBSCRIBE command.
// Unsubscribe sends an UNSUBSCRIBE command.
func (c *Client) Unsubscribe(mailbox string) *Command {
cmd := &Command{}
enc := c.beginCommand("UNSUBSCRIBE", cmd)

View File

@@ -975,9 +975,9 @@ func readBodyType1part(dec *imapwire.Decoder, typ string, options *Options) (*im
}
// Content-Transfer-Encoding should always be set, but some non-standard
// servers leave it NIL. Default to 7BIT.
// servers leave it NIL. Default to 7bit.
if bs.Encoding == "" {
bs.Encoding = "7BIT"
bs.Encoding = "7bit"
}
// TODO: handle errors

View File

@@ -51,7 +51,7 @@ func (c *Client) handleFlags() error {
c.mutex.Lock()
if c.state == imap.ConnStateSelected {
c.mailbox = c.mailbox.copy()
c.mailbox.PermanentFlags = flags
c.mailbox.Flags = flags
}
c.mutex.Unlock()