You've already forked gun-manager-backend
update database driver to modernc.org/sqlite and add Dockerfile with multi-stage build
This commit is contained in:
@@ -4,7 +4,8 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
sqlc "git.siteworxpro.com/gun-manager/sql/db"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
|
||||
_ "modernc.org/sqlite"
|
||||
)
|
||||
|
||||
type Db struct {
|
||||
@@ -20,7 +21,7 @@ func NewDb(file string) (*Db, error) {
|
||||
return &dbConnection, nil
|
||||
}
|
||||
|
||||
db, err := sql.Open("sqlite3", file)
|
||||
db, err := sql.Open("sqlite", file)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user