Last second clean ups
This commit is contained in:
@@ -10,10 +10,6 @@ import (
|
||||
|
||||
var _ sql.Database = &DB{}
|
||||
|
||||
// TODO: Make NewPostgresDB accept a string and Config. IT should
|
||||
// Create a driver of its own.
|
||||
// This will make sure that if you want a driver, it conforms to the interface.
|
||||
|
||||
// NewPostgresDB returns a postgres.DB using the provided Config and driver type.
|
||||
func NewPostgresDB(c Config) (*DB, error) {
|
||||
var driver *pgxDriver
|
||||
@@ -27,6 +23,7 @@ func NewPostgresDB(c Config) (*DB, error) {
|
||||
return &DB{driver}, nil
|
||||
}
|
||||
|
||||
// Create a driver based on the config
|
||||
func createDriver(c Config) (*pgxDriver, error) {
|
||||
switch c.Driver {
|
||||
case PGX:
|
||||
|
||||
Reference in New Issue
Block a user