mirror of
https://codeberg.org/andyscott/weather-cli.git
synced 2024-12-21 12:43:09 -05:00
Added News section
This commit is contained in:
parent
403cb21b51
commit
2d5315d36d
1 changed files with 8 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue