mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-15 07:11:15 +00:00
chore: get rid of static code warnings
This commit is contained in:
@@ -8,14 +8,15 @@ import (
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
)
|
||||
|
||||
func HandleProgramArgs(cfg *config.Config, db *gorm.DB) (exit bool, err error) {
|
||||
// HandleProgramArgs handles program arguments and returns true if the program should exit.
|
||||
func HandleProgramArgs(db *gorm.DB) (exit bool, err error) {
|
||||
migrationSource := flag.String("migrateFrom", "", "path to v1 database file or DSN")
|
||||
migrationDbType := flag.String("migrateFromType", string(config.DatabaseSQLite),
|
||||
"old database type, either mysql, mssql, postgres or sqlite")
|
||||
flag.Parse()
|
||||
|
||||
if *migrationSource != "" {
|
||||
err = migrateFromV1(cfg, db, *migrationSource, *migrationDbType)
|
||||
err = migrateFromV1(db, *migrationSource, *migrationDbType)
|
||||
exit = true
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user