Rename Session.Do to Session.DoIMAP
This commit is contained in:
parent
e93346ffa9
commit
d01c85616a
2 changed files with 6 additions and 6 deletions
|
@ -43,7 +43,7 @@ func handleGetMailbox(ectx echo.Context) error {
|
|||
var mailboxes []*imap.MailboxInfo
|
||||
var msgs []imapMessage
|
||||
var mbox *imap.MailboxStatus
|
||||
err = ctx.Session.Do(func(c *imapclient.Client) error {
|
||||
err = ctx.Session.DoIMAP(func(c *imapclient.Client) error {
|
||||
var err error
|
||||
if mailboxes, err = listMailboxes(c); err != nil {
|
||||
return err
|
||||
|
@ -128,7 +128,7 @@ func handleGetPart(ctx *koushin.Context, raw bool) error {
|
|||
var msg *imapMessage
|
||||
var part *message.Entity
|
||||
var mbox *imap.MailboxStatus
|
||||
err = ctx.Session.Do(func(c *imapclient.Client) error {
|
||||
err = ctx.Session.DoIMAP(func(c *imapclient.Client) error {
|
||||
var err error
|
||||
msg, part, err = getMessagePart(c, mboxName, uid, partPath)
|
||||
mbox = c.Mailbox()
|
||||
|
@ -208,7 +208,7 @@ func handleCompose(ectx echo.Context) error {
|
|||
|
||||
var inReplyTo *imapMessage
|
||||
var part *message.Entity
|
||||
err = ctx.Session.Do(func(c *imapclient.Client) error {
|
||||
err = ctx.Session.DoIMAP(func(c *imapclient.Client) error {
|
||||
var err error
|
||||
inReplyTo, part, err = getMessagePart(c, mboxName, uid, partPath)
|
||||
return err
|
||||
|
|
|
@ -58,9 +58,9 @@ func (s *Session) Username() string {
|
|||
return s.username
|
||||
}
|
||||
|
||||
// Do executes an IMAP operation on this session. The IMAP client can only be
|
||||
// used from inside f.
|
||||
func (s *Session) Do(f func(*imapclient.Client) error) error {
|
||||
// DoIMAP executes an IMAP operation on this session. The IMAP client can only
|
||||
// be used from inside f.
|
||||
func (s *Session) DoIMAP(f func(*imapclient.Client) error) error {
|
||||
s.locker.Lock()
|
||||
defer s.locker.Unlock()
|
||||
|
||||
|
|
Loading…
Reference in a new issue