Skip to content

Instantly share code, notes, and snippets.

@Duncanian
Last active May 31, 2019 11:39
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 Duncanian/118f08a60a412ac125d0359eb0db1e3b to your computer and use it in GitHub Desktop.
Save Duncanian/118f08a60a412ac125d0359eb0db1e3b to your computer and use it in GitHub Desktop.
Handling the endpoint for getting all events in go-rest-api
func getAllEvents(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode(events)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment