This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
"ccsecrets/utils"
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/joho/godotenv"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
_ "modernc.org/sqlite"
|
||||
)
|
||||
@@ -62,13 +61,6 @@ const createSchema string = `
|
||||
func ConnectDatabase() {
|
||||
var err error
|
||||
|
||||
// Load data from environment file
|
||||
err = godotenv.Load(".env")
|
||||
|
||||
if err != nil {
|
||||
log.Fatalf("Error loading .env file")
|
||||
}
|
||||
|
||||
// Try using sqlite as our database
|
||||
sqlPath := utils.GetFilePath(sqlFile)
|
||||
db, err = sqlx.Open("sqlite", sqlPath)
|
||||
|
Reference in New Issue
Block a user