Skip to content

Instantly share code, notes, and snippets.

@arschles
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arschles/a5ed7ba881bb33bc8db9 to your computer and use it in GitHub Desktop.
Save arschles/a5ed7ba881bb33bc8db9 to your computer and use it in GitHub Desktop.
go handler wrapping
func myHandlerFunc(i int) http.HanderFunc {
return func(w http.ResponseWriter, r *http.Request) {
str := fmt.Sprintf("hello %d", i)
w.Write([]byte(str))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment