Skip to content

Instantly share code, notes, and snippets.

View bdharris08's full-sized avatar

Ben Harris bdharris08

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bdharris08 on github.
  • I am benhdev (https://keybase.io/benhdev) on keybase.
  • I have a public key whose fingerprint is EC55 BFA5 CE89 BD8B BE02 9785 68EF CEE6 C881 ACC7

To claim this, I am signing this object:

func travelTime(from string, to string) Directions {
parameters := "json?origin=" + from + "&destination=" + to + "&key=" + key
options := "&departure_time=now"
api := "https://maps.googleapis.com/maps/api/directions/" + parameters + options
resp, err := http.Get(api)
check(err)
defer resp.Body.Close()
// body is a []Byte ("byte slice")