浏览代码

Rename Session.connect to Session.connectIMAP

master
Simon Ser 4 年前
父节点
当前提交
97eef13db4
找不到此签名对应的密钥 GPG 密钥 ID: FDE7BE0E88F5E48
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      session.go

+ 3
- 3
session.go 查看文件

@@ -72,7 +72,7 @@ func (s *Session) DoIMAP(f func(*imapclient.Client) error) error {

if s.imapConn == nil {
var err error
s.imapConn, err = s.manager.connect(s.username, s.password)
s.imapConn, err = s.manager.connectIMAP(s.username, s.password)
if err != nil {
s.Close()
return fmt.Errorf("failed to re-connect to IMAP server: %v", err)
@@ -156,7 +156,7 @@ func newSessionManager(dialIMAP DialIMAPFunc, dialSMTP DialSMTPFunc, logger echo
}
}

func (sm *SessionManager) connect(username, password string) (*imapclient.Client, error) {
func (sm *SessionManager) connectIMAP(username, password string) (*imapclient.Client, error) {
c, err := sm.dialIMAP()
if err != nil {
return nil, err
@@ -184,7 +184,7 @@ func (sm *SessionManager) get(token string) (*Session, error) {
// Put connects to the IMAP server and creates a new session. If authentication
// fails, the error will be of type AuthError.
func (sm *SessionManager) Put(username, password string) (*Session, error) {
c, err := sm.connect(username, password)
c, err := sm.connectIMAP(username, password)
if err != nil {
return nil, err
}


正在加载...
取消
保存