MCPcopy
hub / github.com/jackc/pgx / mustConnect

Function mustConnect

helper_test.go:41–47  ·  view source on GitHub ↗
(t testing.TB, config *pgx.ConnConfig)

Source from the content-addressed store, hash-verified

39}
40
41func mustConnect(t testing.TB, config *pgx.ConnConfig) *pgx.Conn {
42 conn, err := pgx.ConnectConfig(context.Background(), config)
43 if err != nil {
44 t.Fatalf("Unable to establish connection: %v", err)
45 }
46 return conn
47}
48
49func closeConn(t testing.TB, conn *pgx.Conn) {
50 err := conn.Close(context.Background())

Calls

no outgoing calls

Tested by

no test coverage detected