imapclient: clean up function signature of New, allowing for future options too

This commit is contained in:
Mechiel Lukkien
2025-04-11 21:04:13 +02:00
parent af3e9351bc
commit 2c1283f032
6 changed files with 53 additions and 29 deletions

View File

@ -64,7 +64,10 @@ func TestDeliver(t *testing.T) {
tcheck(t, err, "dial imap")
defer imapconn.Close()
imapc, err := imapclient.New(mox.Cid(), imapconn, false)
opts := imapclient.Opts{
Logger: slog.Default().With("cid", mox.Cid()),
}
imapc, err := imapclient.New(imapconn, &opts)
tcheck(t, err, "new imapclient")
_, _, err = imapc.Login(imapuser, imappassword)