Skip to content

Instantly share code, notes, and snippets.

@sang-w0o
Last active March 2, 2022 03:37
Show Gist options
  • Save sang-w0o/d032fdc623781339a485bb8ac18808de to your computer and use it in GitHub Desktop.
Save sang-w0o/d032fdc623781339a485bb8ac18808de to your computer and use it in GitHub Desktop.
grpc_gateway_5.go
type ServeMux struct {
// handlers maps HTTP method to a list of handlers.
handlers map[string][]handler
//..
}
type handler struct {
pat Pattern
h HandlerFunc
}
type HandlerFunc func(w http.ResponseWriter, r *http.Request, pathParams map[string]string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment