mirror of
https://codeberg.org/andyscott/weather-cli.git
synced 2024-12-21 12:43:09 -05:00
Update version info
This commit is contained in:
parent
8ab60dd590
commit
47beff4da5
1 changed files with 16 additions and 14 deletions
30
cmd/main.go
30
cmd/main.go
|
@ -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")
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue