aboutsummaryrefslogtreecommitdiff
path: root/internal/imap
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-25 17:00:57 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-25 17:00:57 +0200
commit573ce1982da2e754947453fdaf0d50204873acb4 (patch)
treef6528235dce77db514ce4442ee8817e993fdcc86 /internal/imap
parentd21881150c09986571a563eaf30bc1687787e63f (diff)
downloadfeed2imap-go-573ce1982da2e754947453fdaf0d50204873acb4.tar.gz
feed2imap-go-573ce1982da2e754947453fdaf0d50204873acb4.tar.bz2
feed2imap-go-573ce1982da2e754947453fdaf0d50204873acb4.zip
Larger restructuring
Diffstat (limited to 'internal/imap')
-rw-r--r--internal/imap/client.go12
-rw-r--r--internal/imap/connection.go4
-rw-r--r--internal/imap/imap.go4
-rw-r--r--internal/imap/url.go4
4 files changed, 12 insertions, 12 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
+}
diff --git a/internal/imap/connection.go b/internal/imap/connection.go
index 358445b..4d209a9 100644
--- a/internal/imap/connection.go
+++ b/internal/imap/connection.go
@@ -8,8 +8,8 @@ import (
"github.com/emersion/go-imap"
imapClient "github.com/emersion/go-imap/client"
- "github.com/Necoro/feed2imap-go/internal/log"
- "github.com/Necoro/feed2imap-go/internal/util"
+ "github.com/Necoro/feed2imap-go/pkg/log"
+ "github.com/Necoro/feed2imap-go/pkg/util"
)
type connection struct {
diff --git a/internal/imap/imap.go b/internal/imap/imap.go
index f8dc7d7..8f4c50e 100644
--- a/internal/imap/imap.go
+++ b/internal/imap/imap.go
@@ -7,10 +7,10 @@ import (
imapClient "github.com/emersion/go-imap/client"
- "github.com/Necoro/feed2imap-go/internal/log"
+ "github.com/Necoro/feed2imap-go/pkg/log"
)
-func newImapClient(url *URL, forceTls bool) (*imapClient.Client,error) {
+func newImapClient(url *URL, forceTls bool) (*imapClient.Client, error) {
if forceTls {
c, err := imapClient.DialTLS(url.Host, nil)
if err != nil {
diff --git a/internal/imap/url.go b/internal/imap/url.go
index 6ffea72..90c34e6 100644
--- a/internal/imap/url.go
+++ b/internal/imap/url.go
@@ -4,7 +4,7 @@ import (
"net"
"net/url"
- "github.com/Necoro/feed2imap-go/internal/log"
+ "github.com/Necoro/feed2imap-go/pkg/log"
)
// Our own convenience wrapper
@@ -73,4 +73,4 @@ func NewUrl(url *url.URL) *URL {
u := URL{URL: url}
u.sanitizeUrl()
return &u
-} \ No newline at end of file
+}