Skip to content

Instantly share code, notes, and snippets.

@nkreiger
Created June 24, 2021 00:48
Show Gist options
  • Save nkreiger/bcc26c98a66551aa442b339950b3857b to your computer and use it in GitHub Desktop.
Save nkreiger/bcc26c98a66551aa442b339950b3857b to your computer and use it in GitHub Desktop.
final go url
func main() {
conn := weatherAPI{
Scheme: "https",
Host: "api.weatherapi.com",
Endpoints: weatherEndpoints{
Forecast: endpoint{
Path: "/forecast.json",
Method: "GET",
},
Sports: endpoint{
Path: "/sports.json",
Method: "GET",
},
},
}
f := conn.ForecastURL("testDate", "testRegion")
m, u := f()
log.Println(m)
log.Println(u)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment