diff options
author | Runxi Yu <me@runxiyu.org> | 2025-01-12 18:01:12 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-01-12 18:01:12 +0800 |
commit | d084b8c621a941c0d2429bf18b082c0e010ed000 (patch) | |
tree | 0951678becc8a57349c462f877bfef4efa328385 | |
parent | go.mod: pgx is a direct import (diff) | |
download | maild-d084b8c621a941c0d2429bf18b082c0e010ed000.tar.gz maild-d084b8c621a941c0d2429bf18b082c0e010ed000.tar.zst maild-d084b8c621a941c0d2429bf18b082c0e010ed000.zip |
Rename db -> global_db
-rw-r--r-- | config.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -26,7 +26,7 @@ var config struct { } var ( config_mutex sync.RWMutex // covers things like the database too - db *pgxpool.Pool + global_db *pgxpool.Pool ) // load_config loads the configuration file and sets up global things according @@ -59,7 +59,7 @@ func load_config(path string) error { if config.DB.Type != "postgres" { return err_unsupported_database_type } - db, err = pgxpool.New(context.Background(), config.DB.Conn) + global_db, err = pgxpool.New(context.Background(), config.DB.Conn) // BUG: Context-related leak: cancel context when the config is invalidated if err != nil { return err |