diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-21 22:20:20 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-21 22:20:20 +0200 |
commit | 89f46e31998dd62a52d7dd07b16f1d81d9597e3e (patch) | |
tree | 7bb463d986804601c04c01f2855eb15293a1a7ee /internal/imap/imap.go | |
parent | 1845873048e1f2c3499e75a4e5cbbe8d1247170d (diff) | |
download | feed2imap-go-89f46e31998dd62a52d7dd07b16f1d81d9597e3e.tar.gz feed2imap-go-89f46e31998dd62a52d7dd07b16f1d81d9597e3e.tar.bz2 feed2imap-go-89f46e31998dd62a52d7dd07b16f1d81d9597e3e.zip |
Upload mails to imap
Diffstat (limited to '')
-rw-r--r-- | internal/imap/imap.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/imap/imap.go b/internal/imap/imap.go index 2fd7580..f284f81 100644 --- a/internal/imap/imap.go +++ b/internal/imap/imap.go @@ -77,7 +77,7 @@ func Connect(url *url.URL) (*Client, error) { } } - var client = Client{c: c, host: url.Host, folders: folders{}} + var client = Client{c: c, host: url.Host, mailboxes: mailboxes{}} defer func() { if err != nil { @@ -113,11 +113,11 @@ func Connect(url *url.URL) (*Client, error) { return nil, fmt.Errorf("fetching delimiter: %w", err) } - client.toplevel = url.Path - if client.toplevel[0] == '/' { - client.toplevel = client.toplevel[1:] + toplevel := url.Path + if toplevel[0] == '/' { + toplevel = toplevel[1:] } - client.toplevel = client.FolderName(strings.Split(client.toplevel, "/")) + client.toplevel = client.folderName(strings.Split(toplevel, "/")) log.Printf("Determined '%s' as toplevel, with '%s' as delimiter", client.toplevel, client.delimiter) |