Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

github.com/gclamigueiro/weather-api-go

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/gclamigueiro/weather-api-go


Version published
Created
Source

weather-api-go

Example API in goland to retrieve the weather of a specific city. The data is obtained from http://api.openweathermap.org

Run example

create .env

Create .env with this values

weatherEnpoint = http://api.openweathermap.org/data/2.5/weather
forecastEndpoint = https://api.openweathermap.org/data/2.5/onecall
apiKey = {YourApiKey}

get dependencies

go mod tidy 

run

go run ./main.go 

Run Test

go test ./test -v

Example urls for testing

http://localhost:8000/weather?city=Cali&country=co

http://localhost:8000/weather?city=Bogota&country=co&forecastday=2

FAQs

Package last updated on 05 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc