From 47beff4da5841d45bb7b0cb11517d7f0836cd7eb Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Wed, 27 Jul 2022 14:55:38 -0400 Subject: [PATCH] Update version info --- cmd/main.go | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index ce6e1c9..4b2319f 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -10,7 +10,7 @@ import ( "github.com/joho/godotenv" ) -const version string = "0.1.0" +const version string = "0.2.0" type weatherMain struct { Temp float32 `json:"temp"` @@ -73,7 +73,9 @@ func main() { fmt.Printf("| Welcome to the OpenWeatherMap-gRPC Client! v%s |\n", app.Version) fmt.Println("=====================================================") - fmt.Println("New in version 0.1.0:") + fmt.Printf("New in version %s:\n", app.Version) + fmt.Println(" - Advanced option: Get historical data back to 1972") + fmt.Println("New in version 0.1.0") fmt.Println(" - Default option: Automatically determine location") fmt.Println(" - Advanced option: Enter exact location for anywhere in the world") fmt.Println(" - Advanced option: Change back and forth between imperial and metric units of measurement") @@ -94,18 +96,18 @@ func main() { } option = strings.TrimSuffix(input, "\n") - } - // Check user input - if option == "1" || option == "" { - getLocation(&app) - getCurrent(&app) - printWeather(&app) - } else if option == "2" { - advancedMenu(&app) - } else if option == "0" { - return - } else { - fmt.Print("\nOops! An error occurred, please choose a valid option.\n\n") + // Check user input + if option == "1" || option == "" { + getLocation(&app) + getCurrent(&app) + printWeather(&app) + } else if option == "2" { + advancedMenu(&app) + } else if option == "0" { + return + } else { + fmt.Print("\nOops! An error occurred, please choose a valid option.\n\n") + } } }