fix: commit
Some checks failed
build quyun / Build (push) Failing after 1m26s

This commit is contained in:
2025-12-22 10:48:26 +08:00
parent 1aab961b8d
commit 885df8aabf
5 changed files with 99 additions and 14 deletions

View File

@@ -90,7 +90,7 @@ func (m *Config) checkDefault() {
}
if m.TimeZone == "" {
m.TimeZone = "Asia/Shanghai"
// m.TimeZone = "Asia/Shanghai"
}
if m.Port == 0 {
@@ -104,9 +104,13 @@ func (m *Config) checkDefault() {
func (m *Config) EmptyDsn() string {
// 基本 DSN
dsnTpl := "host=%s user=%s password=%s port=%d dbname=%s sslmode=%s TimeZone=%s"
// dsnTpl := "host=%s user=%s password=%s port=%d dbname=%s sslmode=%s TimeZone=%s"
// m.checkDefault()
// base := fmt.Sprintf(dsnTpl, m.Host, m.Username, m.Password, m.Port, m.Database, m.SslMode, m.TimeZone)
dsnTpl := "host=%s user=%s password=%s port=%d dbname=%s sslmode=%s"
m.checkDefault()
base := fmt.Sprintf(dsnTpl, m.Host, m.Username, m.Password, m.Port, m.Database, m.SslMode, m.TimeZone)
base := fmt.Sprintf(dsnTpl, m.Host, m.Username, m.Password, m.Port, m.Database, m.SslMode)
// 附加可选参数
extras := ""
if m.UseSearchPath && m.Schema != "" {
@@ -121,9 +125,9 @@ func (m *Config) EmptyDsn() string {
// DSN connection dsn
func (m *Config) DSN() string {
// 基本 DSN
dsnTpl := "host=%s user=%s password=%s dbname=%s port=%d sslmode=%s TimeZone=%s"
dsnTpl := "host=%s user=%s password=%s dbname=%s port=%d sslmode=%s"
m.checkDefault()
base := fmt.Sprintf(dsnTpl, m.Host, m.Username, m.Password, m.Database, m.Port, m.SslMode, m.TimeZone)
base := fmt.Sprintf(dsnTpl, m.Host, m.Username, m.Password, m.Database, m.Port, m.SslMode)
// 附加可选参数
extras := ""
if m.UseSearchPath && m.Schema != "" {