You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simonkellet 9cef9579e3 test 3 weeks ago
.gitignore changes 2 months ago
README.md tidy 7 months ago
file.go changes for error msg 1 month ago
go.mod tweaks and fixes 2 months ago
go.sum tweaks and fixes 2 months ago
json.go changes for error msg 1 month ago
main.go test 3 weeks ago
testfile lets see if this works 4 weeks ago
weather.go tweaks and fixes 2 months ago
web.go changes for error msg 1 month ago

README.md

Go OpenWeather

This is a simple (but messy) Go project I am working on in my spare time!

It pulls JSON data from here and uses 'encoding/json' to sort the data!

Usage

You will need a OpenWeather API-Key. This can be done by opening a free account and creating a key!

./go-weather -h

Will give:

Usage of ./go-weather:
  -api string
    	Enter you api key here (default "none")
  -city string
    	Enter city e.g. London (default "London")
  -code string
    	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:

02/17/2022 17:03
📍Location: Glasgow, GB
Weather:☁ Clouds (few clouds)
🌡 Temp: 5.46°C (Feels like: 2.36°C)
(Min: 3.97°C, Max: 6.22°C)
🌅Sunrise: 07:37	🌇Sunset: 17:24