• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

golang IMAP client library


Commit MetaInfo

Revisione538227818c1d060feb8646026e90a375a9b0037 (tree)
Time2011-10-28 10:50:04
AuthorEvan Martin <martine@dang...>
CommiterEvan Martin

Log Message

prettier

Change Summary

Incremental Difference

--- a/main.go
+++ b/main.go
@@ -68,7 +68,7 @@ func readExtra(im *imap.IMAP) {
6868 func (ui *UI) connect(useNetmon bool) *imap.IMAP {
6969 user, pass := loadAuth("auth")
7070
71- ui.status("connecting")
71+ ui.status("connecting...")
7272 conn, err := tls.Dial("tcp", "imap.gmail.com:993", nil)
7373 check(err)
7474
@@ -87,19 +87,20 @@ func (ui *UI) connect(useNetmon bool) *imap.IMAP {
8787 check(err)
8888 ui.status("server hello: %s", hello)
8989
90- ui.status("logging in")
90+ ui.status("logging in...")
9191 resp, caps, err := im.Auth(user, pass)
9292 check(err)
93- ui.status("capabilities: %s", caps)
9493 ui.status("%s", resp)
94+ ui.status("server capabilities: %s", caps)
9595
9696 return im
9797 }
9898
9999 func (ui *UI) fetch(im *imap.IMAP, mailbox string) {
100+ ui.status("opening %s...", mailbox)
100101 examine, err := im.Examine(mailbox)
101102 check(err)
102- ui.status("%+v", examine)
103+ ui.status("mailbox status: %+v", examine)
103104 readExtra(im)
104105
105106 f, err := os.Create(mailbox + ".mbox")
@@ -107,12 +108,12 @@ func (ui *UI) fetch(im *imap.IMAP, mailbox string) {
107108 mbox := newMbox(f)
108109
109110 query := fmt.Sprintf("1:%d", examine.Exists)
110- ui.status("fetching %s", query)
111+ ui.status("fetching messages %s", query)
111112
112113 ch, err := im.FetchAsync(query, []string{"RFC822"})
113114 check(err)
114115
115- i := 0
116+ i := 1
116117 L:
117118 for {
118119 r := <-ch