A simple Go command-line application that fetches and displays the current weather for a specified location using the Weatherstack API.
- Fetches current weather conditions (temperature, description).
- Displays the local time at the queried location.
- If no location is provided, Tokyo is used by default 💯.
- Colored console output for fun :)
- Go installed on your system (1.16+ recommended).
- A Weatherstack API key (free tier available).
- A
.envfile containing your API key, or an environment variable.
-
Clone or download this repository.
-
Install dependencies:
go get github.com/fatih/color go get github.com/joho/godotenv
-
Create a .env file at the root of your project with the following content:
WEATHER_API_KEY=your_weatherstack_api_key_here
By running go run ./main.go, it will by default give you the weather, current time and current temperature of Tokyo. If you run go run ./main.go , you can check your own location 🔥 😄
enjoyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy