2
0

Require access to ConnString via Config

A Config object may be created via ParseConfig and then further
modified. Requiring access to the original ConnString via the Config
helps indicate that the Config is the source of truth as to how the
connection was actually established.
This commit is contained in:
Jack Christensen
2020-05-16 18:12:04 -05:00
parent 59a2185dfb
commit ac6c49c39d
4 changed files with 3 additions and 9 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ func TestConnect(t *testing.T) {
connString := os.Getenv("PGX_TEST_DATABASE")
pool, err := pgxpool.Connect(context.Background(), connString)
require.NoError(t, err)
assert.Equal(t, connString, pool.ConnString())
assert.Equal(t, connString, pool.Config().ConnString())
pool.Close()
}