mirror of
https://github.com/jackc/pgx.git
synced 2025-07-11 04:58:20 +00:00
Add sslmode note for ParseDSN
This commit is contained in:
parent
6413491657
commit
c44cbb12ab
4
conn.go
4
conn.go
@ -309,6 +309,10 @@ var dsn_regexp = regexp.MustCompile(`([a-z]+)=((?:"[^"]+")|(?:[^ ]+))`)
|
|||||||
// ParseDSN parses a database DSN (data source name) into a ConnConfig
|
// ParseDSN parses a database DSN (data source name) into a ConnConfig
|
||||||
//
|
//
|
||||||
// e.g. ParseDSN("user=username password=password host=1.2.3.4 port=5432 dbname=mydb sslmode=disable")
|
// e.g. ParseDSN("user=username password=password host=1.2.3.4 port=5432 dbname=mydb sslmode=disable")
|
||||||
|
//
|
||||||
|
// ParseDSN tries to match libpq behavior with regard to sslmode. See comments
|
||||||
|
// for ParseEnvLibpq for more information on the security implications of
|
||||||
|
// sslmode options.
|
||||||
func ParseDSN(s string) (ConnConfig, error) {
|
func ParseDSN(s string) (ConnConfig, error) {
|
||||||
var cp ConnConfig
|
var cp ConnConfig
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user