Skip to content

Instantly share code, notes, and snippets.

@madflojo
Last active August 1, 2021 02:12
Show Gist options
  • Save madflojo/f26954e387fab7cdd9bd57071a4d9683 to your computer and use it in GitHub Desktop.
Save madflojo/f26954e387fab7cdd9bd57071a4d9683 to your computer and use it in GitHub Desktop.
httprouter Article - Parameterized Handler
// 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