Add sslmode note for ParseDSN

pull/83/merge
Jack Christensen 2015-08-21 13:50:06 -05:00
parent 6413491657
commit c44cbb12ab
1 changed files with 4 additions and 0 deletions

View File

@ -309,6 +309,10 @@ var dsn_regexp = regexp.MustCompile(`([a-z]+)=((?:"[^"]+")|(?:[^ ]+))`)
// 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")
//
// 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) {
var cp ConnConfig