QoL: Revamp project structure

This commit is contained in:
Mitsu
2025-07-07 22:10:10 +02:00
parent 3a50568113
commit bdce29a129
15 changed files with 57 additions and 41 deletions
+17
View File
@@ -0,0 +1,17 @@
package db
import (
"database/sql"
_ "github.com/mattn/go-sqlite3"
"github.com/mizuw/laterna/server/cmd/internal/logger"
)
func ConnectDB() {
db, err := sql.Open("sqlite3", "./db.sql")
if err != nil {
logger.DBLogger.Printf("An Error occured while connecting to the database: %v", err)
}
logger.DBLogger.Printf("Connected")
defer db.Close()
}
+1
View File
@@ -0,0 +1 @@
package db