Added News section

This commit is contained in:
Andrew Scott 2022-07-13 17:05:07 -04:00
parent 403cb21b51
commit 2d5315d36d
Signed by: a
GPG key ID: 3EB62D0BBB8DB381

View file

@ -55,7 +55,8 @@ func printWeather(app *application) {
unitStr = "Celsius/kph" unitStr = "Celsius/kph"
} }
fmt.Printf("\nUnits: %s (%s)\n\n", app.Config.Units, unitStr) fmt.Println("\nNote! A value of 0 or 0.00 indicates the data is not available at this time.")
fmt.Printf("Units: %s (%s)\n\n", app.Config.Units, unitStr)
fmt.Printf("Current temperature: %.2f\n", app.Forecast.Main.Temp) fmt.Printf("Current temperature: %.2f\n", app.Forecast.Main.Temp)
fmt.Printf("Feels like: %.2f\n", app.Forecast.Main.FeelsLike) fmt.Printf("Feels like: %.2f\n", app.Forecast.Main.FeelsLike)
fmt.Printf("High: %.2f\n", app.Forecast.Main.HighTemp) fmt.Printf("High: %.2f\n", app.Forecast.Main.HighTemp)
@ -92,12 +93,17 @@ 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.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")
for option != "0" { for option != "0" {
fmt.Print("\nMain Menu\n---------\n\n") fmt.Print("\nMain Menu\n---------\n\n")
fmt.Println("1. Today's forecast (use current location, default)") fmt.Println("1. Today's forecast (use current location, default)")
fmt.Println("2. Advanced options") fmt.Println("2. Advanced options (Change units, precise location, etc.)")
fmt.Print("0. Exit\n\n") fmt.Print("0. Exit\n\n")
reader := bufio.NewReader(os.Stdin) reader := bufio.NewReader(os.Stdin)