aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-01-13 16:47:53 +0800
committerRunxi Yu <me@runxiyu.org>2025-01-13 16:47:53 +0800
commitf5d321c4a92b72f8126a33b08ba0ff315918dc0f (patch)
treeac001d7b3f3d4e715672bbfc311d7687a9f802e6
parentListen to IMAP (diff)
downloadmaild-f5d321c4a92b72f8126a33b08ba0ff315918dc0f.tar.gz
maild-f5d321c4a92b72f8126a33b08ba0ff315918dc0f.tar.zst
maild-f5d321c4a92b72f8126a33b08ba0ff315918dc0f.zip
Reformat code
-rw-r--r--serve_imap.go3
-rw-r--r--serve_mx.go4
2 files changed, 3 insertions, 4 deletions
diff --git a/serve_imap.go b/serve_imap.go
index f1d195d..5337570 100644
--- a/serve_imap.go
+++ b/serve_imap.go
@@ -22,7 +22,6 @@ func serve_imap() {
}
clog.Info("IMAP: Listening via " + imap_net + " on " + imap_addr)
-
server := imapserver.New(&imapserver.Options{
NewSession: func(conn *imapserver.Conn) (imapserver.Session, *imapserver.GreetingData, error) {
return nil, nil, nil
@@ -31,7 +30,7 @@ func serve_imap() {
imap.CapIMAP4rev1: {},
imap.CapIMAP4rev2: {},
},
- DebugWriter: nil, // TODO
+ DebugWriter: nil, // TODO
})
err = server.Serve(listener)
if err != nil {
diff --git a/serve_mx.go b/serve_mx.go
index 32710be..5e52ed3 100644
--- a/serve_mx.go
+++ b/serve_mx.go
@@ -12,8 +12,8 @@ import (
"strings"
"github.com/jackc/pgx/v5/pgxpool"
- "go.lindenii.runxiyu.org/lindenii-common/mailkit"
"go.lindenii.runxiyu.org/lindenii-common/clog"
+ "go.lindenii.runxiyu.org/lindenii-common/mailkit"
)
type server_state_t uint
@@ -233,7 +233,7 @@ func handle_mx_recv_conn(ctx context.Context, net_conn net.Conn) error {
func serve_mx() {
var mx_net, mx_addr string
- config_consistent_run(func(){
+ config_consistent_run(func() {
mx_net = config.MX.Net
mx_addr = config.MX.Addr
})