Use ssl flag when generating connection string, remove hardcoded value
This commit is contained in:
3
main.go
3
main.go
@@ -37,9 +37,10 @@ func getConnectionString() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
"host=%s port=%d user=%s dbname=%s sslmode=disable",
|
"host=%s port=%d user=%s dbname=%s sslmode=%s",
|
||||||
options.Host, options.Port,
|
options.Host, options.Port,
|
||||||
options.User, options.DbName,
|
options.User, options.DbName,
|
||||||
|
options.Ssl,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user