This commit is contained in:
oneao committed 2025-11-23 22:43:57 +08:00
1 parent ac0843c041
commit a917be08d1
65 files changed
+8043

No files matched your search

@@ -0,0 +1,32 @@
package config
import (
"time"
)
type dbConfig struct {
Host string
Port int
User string
Password string
Dbname string
SllMode bool
TimeZone string
MaxOpenConns int
MaxIdleConns int
ConnMaxLifetime time.Duration
}
// Db 默认值
var Db = &dbConfig{
Host: "117.72.182.135",
Port: 5432,
User: "postgres",
Password: "zhang520..",
Dbname: "base",
SllMode: false,
TimeZone: "Asia/Shanghai",
MaxOpenConns: 10,
MaxIdleConns: 5,
ConnMaxLifetime: 30 * time.Minute,
}