Created
February 4, 2018 13:01
-
-
Save rafa-acioly/76113ca8c7e4e50a52e7647609cb4817 to your computer and use it in GitHub Desktop.
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 main() { | |
router := mux.NewRouter() | |
router.HandleFunc("/contato", GetPeople).Methods("GET") | |
router.HandleFunc("/contato/{id}", GetPerson).Methods("GET") | |
router.HandleFunc("/contato/{id}", CreatePerson).Methods("POST") | |
router.HandleFunc("/contato/{id}", DeletePerson).Methods("DELETE") | |
log.Fatal(http.ListenAndServe(":8000", router)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment