aboutsummaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-01-12 18:22:02 +0800
committerRunxi Yu <me@runxiyu.org>2025-01-12 18:22:02 +0800
commit5294c5740f8ee7904ff8994c27059458cb8f5f6a (patch)
tree56d4831adb36ff3590b583131f96d578d3e20875 /config.go
parentRename db -> global_db (diff)
downloadmaild-5294c5740f8ee7904ff8994c27059458cb8f5f6a.tar.gz
maild-5294c5740f8ee7904ff8994c27059458cb8f5f6a.tar.zst
maild-5294c5740f8ee7904ff8994c27059458cb8f5f6a.zip
Restructure mta_recv -> mx_recv
Diffstat (limited to '')
-rw-r--r--config.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/config.go b/config.go
index f8f575e..c58071b 100644
--- a/config.go
+++ b/config.go
@@ -12,8 +12,7 @@ import (
)
var config struct {
- Server_name string `scfg:"server_name"`
- Routes map[string]string `scfg:"routes"`
+ Server_name string `scfg:"server_name"`
TLS struct {
Cert string `scfg:"cert"`
Key string `scfg:"key"`
@@ -25,8 +24,8 @@ var config struct {
_tls_config *tls.Config
}
var (
- config_mutex sync.RWMutex // covers things like the database too
- global_db *pgxpool.Pool
+ config_mutex sync.RWMutex // covers things like the database too
+ global_db *pgxpool.Pool // only call Close() after replacing this global variable
)
// load_config loads the configuration file and sets up global things according