15 lines
380 B
Go
15 lines
380 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
//weather, err := http.Get("https://api.openweathermap.org/data/2.5/weather?lat=" + latitude + "&lon=" + longitude + "&appid=" + apikey)
|
|
weather, err := http.Get("https://api.openweathermap.org/data/2.5/weather?lat=47.772&lon=-122.22&appid=0c7757e1fecf8d20a8a385b2be959d98")
|
|
if err != nil {
|
|
print(err)
|
|
}
|
|
print(weather)
|
|
}
|