diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-25 17:00:57 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-25 17:00:57 +0200 |
commit | 573ce1982da2e754947453fdaf0d50204873acb4 (patch) | |
tree | f6528235dce77db514ce4442ee8817e993fdcc86 /internal/imap/client.go | |
parent | d21881150c09986571a563eaf30bc1687787e63f (diff) | |
download | feed2imap-go-573ce1982da2e754947453fdaf0d50204873acb4.tar.gz feed2imap-go-573ce1982da2e754947453fdaf0d50204873acb4.tar.bz2 feed2imap-go-573ce1982da2e754947453fdaf0d50204873acb4.zip |
Larger restructuring
Diffstat (limited to '')
-rw-r--r-- | internal/imap/client.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/imap/client.go b/internal/imap/client.go index 404c03e..24cc3f1 100644 --- a/internal/imap/client.go +++ b/internal/imap/client.go @@ -3,7 +3,7 @@ package imap import ( imapClient "github.com/emersion/go-imap/client" - "github.com/Necoro/feed2imap-go/internal/log" + "github.com/Necoro/feed2imap-go/pkg/log" ) const numberConns = 5 @@ -16,9 +16,9 @@ type connConf struct { type Client struct { connConf - mailboxes *mailboxes - commander *commander - connections [numberConns]*connection + mailboxes *mailboxes + commander *commander + connections [numberConns]*connection nextFreeIndex int } @@ -37,7 +37,7 @@ func (client *Client) Disconnect() { } } -func (client *Client) createConnection(c *imapClient.Client) *connection{ +func (client *Client) createConnection(c *imapClient.Client) *connection { if client.nextFreeIndex >= len(client.connections) { panic("Too many connections") } @@ -56,4 +56,4 @@ func (client *Client) createConnection(c *imapClient.Client) *connection{ func NewClient() *Client { return &Client{mailboxes: NewMailboxes()} -}
\ No newline at end of file +} |