File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ func (c *conn) handleIdle(tag string) error {
2121 }
2222
2323 done := make (chan struct {})
24- err := c .handler .Idle (& idleWriter {} , done , c .ctx )
24+ err := c .handler .Idle (newIdleWriter ( c . tpc ) , done , c .ctx )
2525 if err != nil {
2626 return err
2727 }
@@ -57,6 +57,10 @@ type idleWriter struct {
5757 tpc * textproto.Conn
5858}
5959
60+ func newIdleWriter (tpc * textproto.Conn ) * idleWriter {
61+ return & idleWriter {tpc : tpc }
62+ }
63+
6064func (w * idleWriter ) WriteNumMessages (n uint32 ) error {
6165 return w .tpc .PrintfLine ("* %v EXISTS" , n )
6266}
@@ -66,5 +70,5 @@ func (w *idleWriter) WriteMessageFlags(msn uint32, flags []Flag) error {
6670}
6771
6872func (w * idleWriter ) WriteExpunge (msn uint32 ) error {
69- return w .tpc .PrintfLine ("%v EXPUNGE" , msn )
73+ return w .tpc .PrintfLine ("* %v EXPUNGE" , msn )
7074}
You can’t perform that action at this time.
0 commit comments