Skip to content

Instantly share code, notes, and snippets.

@kpurdon
Last active May 28, 2016 02:57
Show Gist options
  • Save kpurdon/629041aa608e774f55b13945a920fed9 to your computer and use it in GitHub Desktop.
Save kpurdon/629041aa608e774f55b13945a920fed9 to your computer and use it in GitHub Desktop.
// GetTestHandler returns a http.HandlerFunc for testing http middleware
func GetTestHandler() http.HandlerFunc {
fn := func(rw http.ResponseWriter, req *http.Request) {
panic("test entered test handler, this should not happen")
}
return http.HandlerFunc(fn)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment