New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

github.com/aculclasure/weather

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/aculclasure/weather

v0.1.0
Version published
Created

Go OpenWeather API Client

Go package that provides a client for interacting with the current weather API hosted by OpenWeather. It provides some basic measurements of current weather for a given location.

Setup

You will need to create an OpenWeather account and API key. See their getting started guide for help on how to do this. Once you have the API key, it should be set as the environment variable OPENWEATHER_API_KEY.

Usage

Mac/Linux

$ cd cmd/weather

$  go run main.go -h
USAGE: weather [-units={standard|metric|imperial}] <location>

  -units string
        the units to use, one of: standard, metric, imperial (default "imperial")

$ OPENWEATHER_API_KEY=<YOUR-API-KEY> go run main.go --units=metric london

overcast clouds, 9.21 C, humidity 46%

Windows Powershell

PS ${env:OPENWEATHER_API_KEY}=<YOUR-API-KEY>

PS cd cmd\weather

PS go run main.go --units=metric london

overcast clouds, 9.21 C, humidity 46%

FAQs

Package last updated on 07 May 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