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