Fix string format
This commit is contained in:
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"demo/weather/geo"
|
||||
"demo/weather/weather"
|
||||
"flag"
|
||||
"fmt"
|
||||
|
||||
@@ -11,7 +12,7 @@ import (
|
||||
func main() {
|
||||
color.Green("__ПОГОДА__")
|
||||
city := flag.String("city", "", "Город пользователя")
|
||||
// format := flag.Int("format", 1, "Формат вывода погоды")
|
||||
format := flag.Int("format", 1, "Формат вывода погоды")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
@@ -20,5 +21,7 @@ func main() {
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
fmt.Println(*geoData)
|
||||
// fmt.Println(*geoData)
|
||||
weatherData := weather.GetWeather(*geoData, *format)
|
||||
fmt.Println(weatherData)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user