|
|
|
@ -76,9 +76,9 @@ type Sys struct { |
|
|
|
|
func main() { |
|
|
|
|
//set up the flags for the program to use!
|
|
|
|
|
var city, code, api_key string |
|
|
|
|
flag.StringVar(&city, "city", "London", "Enter city e.g. London, Glasgow etc... (Default: London)") |
|
|
|
|
flag.StringVar(&code, "code", "uk", "Enter Code e.g. uk, us etc... (Default: uk)") |
|
|
|
|
flag.StringVar(&api_key, "api", "none", "Enter you api key here... (Default: none") |
|
|
|
|
flag.StringVar(&city, "city", "London", "Enter city e.g. London") |
|
|
|
|
flag.StringVar(&code, "code", "uk", "Enter Code e.g. uk") |
|
|
|
|
flag.StringVar(&api_key, "api", "none", "Enter you api key here") |
|
|
|
|
flag.Parse() |
|
|
|
|
|
|
|
|
|
full := "https://api.openweathermap.org/data/2.5/weather?q=" + city + "," + code + "&units=metric" + "&appid=" + api_key + "" |
|
|
|
@ -88,7 +88,6 @@ func main() { |
|
|
|
|
|
|
|
|
|
//Create file
|
|
|
|
|
createFile(string(html), false) |
|
|
|
|
|
|
|
|
|
//Load the file
|
|
|
|
|
data, _ := loadJson("weather.json") |
|
|
|
|
|
|
|
|
|