update
This commit is contained in:
@@ -25,10 +25,10 @@ type PostgreSQLOptions struct {
|
||||
|
||||
// DSN return DSN from PostgreSQLOptions.
|
||||
func (o *PostgreSQLOptions) DSN() string {
|
||||
splited := strings.Split(o.Addr, ":")
|
||||
host, port := splited[0], "5432"
|
||||
if len(splited) > 1 {
|
||||
port = splited[1]
|
||||
split := strings.Split(o.Addr, ":")
|
||||
host, port := split[0], "5432"
|
||||
if len(split) > 1 {
|
||||
port = split[1]
|
||||
}
|
||||
|
||||
return fmt.Sprintf(`user=%s password=%s host=%s port=%s dbname=%s sslmode=disable TimeZone=Asia/Shanghai`,
|
||||
|
||||
Reference in New Issue
Block a user