aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-02-10 17:21:34 +0100
committerSimon Ser <contact@emersion.fr>2020-02-10 17:21:34 +0100
commit97eef13db46d0efb67d92f4f5ce69f216b20d359 (patch)
tree05bcc9cfba837b212b8cd6e5392024568c2944bf
parent9fe20a604c3ccf3f5e6799ed82bbc1d30743fb32 (diff)
downloadalps-97eef13db46d0efb67d92f4f5ce69f216b20d359.tar.gz
alps-97eef13db46d0efb67d92f4f5ce69f216b20d359.zip
Rename Session.connect to Session.connectIMAP
-rw-r--r--session.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/session.go b/session.go
index 99fa676..3aea68e 100644
--- a/session.go
+++ b/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
}