Skip to content

Instantly share code, notes, and snippets.

@vpolouchkine
Last active February 22, 2017 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vpolouchkine/14b8aa5b655a021bdd21fd9e157fe4fa to your computer and use it in GitHub Desktop.
Save vpolouchkine/14b8aa5b655a021bdd21fd9e157fe4fa to your computer and use it in GitHub Desktop.
func main() {
listener := lyft.NewListener("...")
listener.RegisterHandler(handleArrived, lyft.RideStatusArrived)
http.HandleFunc("/", listener.Handler)
http.ListenAndServe(":3000", nil)
}
func handleArrived(e lyft.IncomingEvent) {
fmt.Printf("Your ride is here!")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment