Update version info

This commit is contained in:
Andrew Scott 2022-07-27 14:55:38 -04:00
parent 8ab60dd590
commit 47beff4da5
Signed by: a
GPG key ID: 3EB62D0BBB8DB381

View file

@ -10,7 +10,7 @@ import (
"github.com/joho/godotenv" "github.com/joho/godotenv"
) )
const version string = "0.1.0" const version string = "0.2.0"
type weatherMain struct { type weatherMain struct {
Temp float32 `json:"temp"` Temp float32 `json:"temp"`
@ -73,7 +73,9 @@ func main() {
fmt.Printf("| Welcome to the OpenWeatherMap-gRPC Client! v%s |\n", app.Version) fmt.Printf("| Welcome to the OpenWeatherMap-gRPC Client! v%s |\n", app.Version)
fmt.Println("=====================================================") 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(" - Default option: Automatically determine location")
fmt.Println(" - Advanced option: Enter exact location for anywhere in the world") 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") 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") option = strings.TrimSuffix(input, "\n")
} // Check user input
// Check user input if option == "1" || option == "" {
if option == "1" || option == "" { getLocation(&app)
getLocation(&app) getCurrent(&app)
getCurrent(&app) printWeather(&app)
printWeather(&app) } else if option == "2" {
} else if option == "2" { advancedMenu(&app)
advancedMenu(&app) } else if option == "0" {
} else if option == "0" { return
return } else {
} else { fmt.Print("\nOops! An error occurred, please choose a valid option.\n\n")
fmt.Print("\nOops! An error occurred, please choose a valid option.\n\n") }
} }
} }