1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

add postgres DSN config option

This commit is contained in:
f0x
2022-10-31 18:07:16 +01:00
parent 6e5bc38e5e
commit ebbc21f0b1
2 changed files with 5 additions and 0 deletions

View File

@@ -66,6 +66,10 @@ func mysqlConnectionString(config *dbConfig) string {
}
func postgresConnectionString(config *dbConfig) string {
if len(config.DSN) > 0 {
return config.DSN
}
sslmode := "disable"
if config.Ssl {
sslmode = "require"