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.
Simon Kellet c13535379f EVEN BETTER 3 years ago
.gitignore added ignores 3 years ago
README.md added some github imports and updated rdm 3 years ago
go-weather EVEN BETTER 3 years ago
go.mod better emoji support 3 years ago
go.sum better emoji support 3 years ago
main.go EVEN BETTER 3 years 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 Code e.g. uk, us etc... Default(none) (default "none")
  -city string
    	Enter city e.g. London, Glasgow etc... (Default: London) (default "London")
  -code string
    	Enter Code e.g. uk, us etc... (Default: uk) (default "uk")

./go-weather -api=API-KEY -city=Glasgow -code=uk

Will give:

02/17/2022 10:17
This will print text in bold white.
Location: Glasgow, GB
Weather: Rain (light rain)
Temp: 5.64°C (Feels like: 0.78°C)
(Min: 3.17°C, Max: 6.84°C)
Sunrise: 07:37	Sunset: 17:24