aboutsummaryrefslogtreecommitdiff
path: root/internal/imap/imap.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-26 17:31:33 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-26 17:31:33 +0200
commit835d5f3547f10ede1997a938d9278a506a089bb7 (patch)
tree8bf73e9a068d1ebacc2fe8888e708dd7ac7ae0c1 /internal/imap/imap.go
parent7ed48c710d1c95b74d3da60d55a4c30a30400617 (diff)
downloadfeed2imap-go-835d5f3547f10ede1997a938d9278a506a089bb7.tar.gz
feed2imap-go-835d5f3547f10ede1997a938d9278a506a089bb7.tar.bz2
feed2imap-go-835d5f3547f10ede1997a938d9278a506a089bb7.zip
Some linting remarks
Diffstat (limited to 'internal/imap/imap.go')
-rw-r--r--internal/imap/imap.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/internal/imap/imap.go b/internal/imap/imap.go
index 8f4c50e..f8c8632 100644
--- a/internal/imap/imap.go
+++ b/internal/imap/imap.go
@@ -11,20 +11,23 @@ import (
)
func newImapClient(url *URL, forceTls bool) (*imapClient.Client, error) {
+ var (
+ c *imapClient.Client
+ err error
+ )
+
if forceTls {
- c, err := imapClient.DialTLS(url.Host, nil)
- if err != nil {
+ if c, err = imapClient.DialTLS(url.Host, nil); err != nil {
return nil, fmt.Errorf("connecting (TLS) to %s: %w", url.Host, err)
}
log.Print("Connected to ", url.Host, " (TLS)")
- return c, nil
} else {
- c, err := imapClient.Dial(url.Host)
- if err != nil {
+ if c, err = imapClient.Dial(url.Host); err != nil {
return nil, fmt.Errorf("connecting to %s: %w", url.Host, err)
}
- return c, nil
}
+
+ return c, nil
}
func (client *Client) connect(url *URL, forceTls bool) (*connection, error) {
>2008-07-03New plugin system - first hackRené 'Necoro' Neumann2-420/+683 2008-06-30Now the new design is able to do the same as the old oneRené 'Necoro' Neumann3-168/+182 2008-06-30First draft of the new plugin windowRené 'Necoro' Neumann1-8/+172 2008-06-30Added stuff to plugin.pyRené 'Necoro' Neumann1-2/+24 2008-06-25Now load 22 versions when running the correct portageRené 'Necoro' Neumann4-8/+18 2008-06-25Added Package_22 and System_22René 'Necoro' Neumann4-5/+63