Removed OldConnectToDatabase
This commit is contained in:
@@ -120,17 +120,6 @@ func (conn *SafeConn) Close() error {
|
|||||||
return conn.db.Close()
|
return conn.db.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a database connection handle for the DB
|
|
||||||
func OldConnectToDatabase(dbName string) (*sql.DB, error) {
|
|
||||||
file := fmt.Sprintf("file:%s.db", dbName)
|
|
||||||
db, err := sql.Open("sqlite", file)
|
|
||||||
if err != nil {
|
|
||||||
return nil, errors.Wrap(err, "sql.Open")
|
|
||||||
}
|
|
||||||
|
|
||||||
return db, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns a database connection handle for the DB
|
// Returns a database connection handle for the DB
|
||||||
func ConnectToDatabase(dbName string) (*SafeConn, error) {
|
func ConnectToDatabase(dbName string) (*SafeConn, error) {
|
||||||
file := fmt.Sprintf("file:%s.db", dbName)
|
file := fmt.Sprintf("file:%s.db", dbName)
|
||||||
|
|||||||
Reference in New Issue
Block a user