1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
wtf/weather/client.go

20 lines
290 B
Go

package weather
import (
"os"
owm "github.com/briandowns/openweathermap"
)
func Fetch() *owm.CurrentWeatherData {
w, err := owm.NewCurrent("C", "EN", os.Getenv("WTF_OWM_API_KEY"))
if err != nil {
panic(err)
}
//w.CurrentByName("Toronto,ON")
w.CurrentByID(6173331)
return w
}