diff --git a/README.md b/README.md index 5905134..bea553b 100644 --- a/README.md +++ b/README.md @@ -9,21 +9,20 @@ You will need a OpenWeather API-Key. This can be done by opening a free account ./go-weather -h ``` Will give: -``` -Usage of go-weather: +```text +Usage of ./go-weather: -api string - Enter Code e.g. uk, us etc... Default(none) (default "none") + Enter you api key here (default "none") -city string - Enter city e.g. London, Glasgow etc... (Default: London) (default "London") + Enter city e.g. London (default "London") -code string - Enter Code e.g. uk, us etc... (Default: uk) (default "uk") - + Enter Code e.g. uk (default "uk") ``` - +Running the command in a terminal like so: ``` ./go-weather -api=API-KEY -city=Glasgow -code=uk ``` -Will give: +**Will give:** ``` 02/17/2022 17:03 📍Location: Glasgow, GB diff --git a/go-weather b/go-weather index 4825e2f..fece0df 100755 Binary files a/go-weather and b/go-weather differ diff --git a/main.go b/main.go index c4a7e5e..267baa9 100644 --- a/main.go +++ b/main.go @@ -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")