aboutsummaryrefslogtreecommitdiff
path: root/deliver_local.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-01-13 12:25:46 +0800
committerRunxi Yu <me@runxiyu.org>2025-01-13 12:25:46 +0800
commit8724c4b8935aceefdc3cea4e82dfba7d28a36cc6 (patch)
tree3712dbd26f69cea86f85f07751b49d172f6f833c /deliver_local.go
parentClose connections on QUIT (diff)
downloadmaild-8724c4b8935aceefdc3cea4e82dfba7d28a36cc6.tar.gz
maild-8724c4b8935aceefdc3cea4e82dfba7d28a36cc6.tar.zst
maild-8724c4b8935aceefdc3cea4e82dfba7d28a36cc6.zip
Bug fixes
Diffstat (limited to 'deliver_local.go')
-rw-r--r--deliver_local.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/deliver_local.go b/deliver_local.go
index 9a29459..47af7f9 100644
--- a/deliver_local.go
+++ b/deliver_local.go
@@ -1,8 +1,8 @@
package main
import (
- "fmt"
"context"
+
"github.com/jackc/pgx/v5/pgxpool"
)
@@ -15,7 +15,6 @@ func deliver_local(ctx context.Context, db *pgxpool.Pool, envelope_from string,
for _, address := range addresses {
_, err = tx.Exec(ctx, "INSERT INTO mail (mailbox_id, data) SELECT a.mailbox_id, $2::bytea FROM addresses a JOIN mailboxes m ON a.mailbox_id = m.id WHERE a.address = $1;", address, data)
if err != nil {
- fmt.Printf("%#v\n", err)
return err
}
}