Last active
August 1, 2021 02:12
-
-
Save madflojo/f26954e387fab7cdd9bd57071a4d9683 to your computer and use it in GitHub Desktop.
httprouter Article - Parameterized Handler
This file contains hidden or 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
// handler is a basic HTTP handler that prints hello world. | |
func handler(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { | |
fmt.Fprintf(w, "Hello %s", ps.ByName("name")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment