From 0c5a71a3acd74f86e3f45104d86cca9cc20ab289 Mon Sep 17 00:00:00 2001 From: Simone Ferretti Date: Fri, 20 Sep 2024 11:12:23 +0200 Subject: [PATCH] fix: reorder form to have custom dir on upload --- main.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/main.go b/main.go index 96e389e..977911c 100644 --- a/main.go +++ b/main.go @@ -31,24 +31,25 @@ func main() { log.Fatal(err) } - switch formData.action { - case "migrate": + if formData.action == "migrate" { err = GetMigrationType(&formData, theme) if err != nil { log.Fatal(err) } - case "upload": - err = GetSelectedMigration(&formData, theme) - if err != nil { - log.Fatal(err) - } } - err = GetDirectory(&formData, theme) if err != nil { log.Fatal(err) } + if formData.action == "upload" { + + err = GetSelectedMigration(&formData, theme) + if err != nil { + log.Fatal(err) + } + } + err = DisplaySummary(&formData, theme) if err != nil { log.Fatal(err)