Update database.go
This commit is contained in:
parent
4ba331fbfd
commit
96a509384d
1 changed files with 2 additions and 2 deletions
|
@ -34,8 +34,8 @@ type Database struct {
|
||||||
Message *MessageQuery
|
Message *MessageQuery
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(file string) (*Database, error) {
|
func New(dbType string, uri string) (*Database, error) {
|
||||||
conn, err := sql.Open("postgres", file)
|
conn, err := sql.Open(dbType, uri)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue