add gamelist location as a parameter
This commit is contained in:
@@ -6,10 +6,11 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
GameListLocation string
|
||||
}
|
||||
|
||||
func Scan(files []string, config Config) {
|
||||
gameList, err := loadGamelist("./ps2-gameslist.txt")
|
||||
gameList, err := loadGamelist(config.GameListLocation)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to load game list: %v", err)
|
||||
os.Exit(1)
|
||||
@@ -31,7 +32,7 @@ func Scan(files []string, config Config) {
|
||||
}
|
||||
|
||||
func Rename(files []string, config Config) {
|
||||
gameList, err := loadGamelist("./ps2-gameslist.txt")
|
||||
gameList, err := loadGamelist(config.GameListLocation)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to load game list: %v", err)
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user