Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pooulad/gowfa
🚨This program is written with GO to forecast weather
https://github.com/pooulad/gowfa
Last synced: about 4 hours ago
JSON representation
🚨This program is written with GO to forecast weather
- Host: GitHub
- URL: https://github.com/pooulad/gowfa
- Owner: pooulad
- License: mit
- Created: 2023-11-08T15:19:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-09T18:06:38.000Z (about 1 year ago)
- Last Synced: 2024-06-21T17:02:43.789Z (5 months ago)
- Language: Go
- Size: 27.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gowfa⛈
🚨This simple program is written with GO to forecast weather## You can use with 2 methods :
1. Api version
2. Cli version## How to use:
First of all you need to create an .env file and add "".
The key should be api key from https://weatherapi.com/ .## Run:
**Cli mode :**
```bash
go run ./cmd/app/main.go -c="name of city"
```
![image](https://github.com/pooulad/gowfa/assets/86445458/ee49e779-74ba-44a2-b50e-6987b31be8fd)**Api mode :**
```bash
go run ./cmd/app/main.go -c="name of city" -a
```
Test api with curl```bash
curl localhost:3000/forecast?city=Tehran
```![image](https://github.com/pooulad/gowfa/assets/86445458/58ba715c-189d-44e0-9cf8-17dae12de614)
The response is large json data about weather of city