Move update logic to subcommand
This commit is contained in:
parent
0e3ee54e1c
commit
c0c290916a
|
@ -12,6 +12,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
UpdateSubcommand string = "update"
|
||||||
ImportSubcommand string = "import"
|
ImportSubcommand string = "import"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -24,7 +25,6 @@ func main() {
|
||||||
db := database.GetDatabaseFromConfig("config." + profile + ".json")
|
db := database.GetDatabaseFromConfig("config." + profile + ".json")
|
||||||
figlet.ReadFigletFonts()
|
figlet.ReadFigletFonts()
|
||||||
cli.ShowSplashScreen()
|
cli.ShowSplashScreen()
|
||||||
cli.RunUpdateCheck(db)
|
|
||||||
|
|
||||||
// TODO: Decide in what form we need to retain this functionality if any
|
// TODO: Decide in what form we need to retain this functionality if any
|
||||||
//cli.MainCliLoop(db)
|
//cli.MainCliLoop(db)
|
||||||
|
@ -54,6 +54,9 @@ func main() {
|
||||||
err = logic.ImportDelverLensCards(db, delverLensCards, storageAreaId)
|
err = logic.ImportDelverLensCards(db, delverLensCards, storageAreaId)
|
||||||
logic.Check(err)
|
logic.Check(err)
|
||||||
break
|
break
|
||||||
|
case UpdateSubcommand:
|
||||||
|
cli.RunUpdateCheck(db)
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
fmt.Fprintf(os.Stderr, "Unrecognized subcommand: %s\n", os.Args[1])
|
fmt.Fprintf(os.Stderr, "Unrecognized subcommand: %s\n", os.Args[1])
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue