Skip to content

Commit b76437f

Browse files
Fix imports
1 parent de3a2fe commit b76437f

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

db_generator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ package main
33
import (
44
"database/sql"
55
"fmt"
6+
models "github.com/UncleJunVIP/ROMnibus/models"
7+
"github.com/UncleJunVIP/ROMnibus/utils"
68
_ "github.com/mattn/go-sqlite3"
79
"os"
810
"os/exec"
911
"path/filepath"
1012
"regexp"
11-
"romnibus/models"
12-
"romnibus/utils"
1313
"strings"
1414
)
1515

go.mod

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
module github.com/UncleJunVIP/ROMnibus
1+
module github.com/UncleJunVIP/ROMnibus
22

33
go 1.24
44

5-
require (
6-
github.com/mattn/go-sqlite3 v1.14.31
7-
)
5+
require github.com/mattn/go-sqlite3 v1.14.31

utils/db.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"database/sql"
55
"errors"
66
"fmt"
7-
"romnibus/models"
7+
"github.com/UncleJunVIP/ROMnibus/models"
88
)
99

1010
var db *sql.DB
@@ -20,7 +20,7 @@ func CloseDB() error {
2020
return db.Close()
2121
}
2222

23-
func FindByHash(db *sql.DB, hash string) (*models.Game, error) {
23+
func FindByHash(hash string) (*models.Game, error) {
2424
if db == nil {
2525
return nil, errors.New("database is not initialized")
2626
}
@@ -39,7 +39,7 @@ func FindByHash(db *sql.DB, hash string) (*models.Game, error) {
3939
return &game, nil
4040
}
4141

42-
func FindByFilename(db *sql.DB, filename string) (*models.Game, error) {
42+
func FindByFilename(filename string) (*models.Game, error) {
4343
if db == nil {
4444
return nil, errors.New("database is not initialized")
4545
}

0 commit comments

Comments
 (0)