Use Go 1.20's link syntax for ParseConfig
This commit is contained in:
committed by
Jack Christensen
parent
f4533dc906
commit
8fb309c631
+2
-3
@@ -4,13 +4,12 @@ pgxpool implements a nearly identical interface to pgx connections.
|
||||
|
||||
Creating a Pool
|
||||
|
||||
The primary way of creating a pool is with `pgxpool.New`.
|
||||
The primary way of creating a pool is with [pgxpool.New]:
|
||||
|
||||
pool, err := pgxpool.New(context.Background(), os.Getenv("DATABASE_URL"))
|
||||
|
||||
The database connection string can be in URL or DSN format. PostgreSQL settings, pgx settings, and pool settings can be
|
||||
specified here. In addition, a config struct can be created by `ParseConfig` and modified before establishing the
|
||||
connection with `ConnectConfig`.
|
||||
specified here. In addition, a config struct can be created by [ParseConfig].
|
||||
|
||||
config, err := pgxpool.ParseConfig(os.Getenv("DATABASE_URL"))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user