2
0

Clean up old Go 1.10 build tags

pgx requires Go modules which requires at least Go 1.11 so there is no
use in build tags to support older Go versions.
This commit is contained in:
Jack Christensen
2020-05-08 12:18:09 -05:00
parent c03ac1519e
commit c44cda4bb4
5 changed files with 62 additions and 104 deletions
+9
View File
@@ -19,6 +19,15 @@ import (
"github.com/stretchr/testify/require"
)
func openDB(t testing.TB) *sql.DB {
config, err := pgx.ParseConfig(os.Getenv("PGX_TEST_DATABASE"))
if err != nil {
t.Fatalf("pgx.ParseConnectionString failed: %v", err)
}
return stdlib.OpenDB(*config)
}
func closeDB(t testing.TB, db *sql.DB) {
err := db.Close()
if err != nil {