Last active
May 31, 2019 11:39
-
-
Save Duncanian/118f08a60a412ac125d0359eb0db1e3b to your computer and use it in GitHub Desktop.
Handling the endpoint for getting all events in go-rest-api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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