Skip to content

Instantly share code, notes, and snippets.

@sang-w0o
Created March 2, 2022 02:58
Show Gist options
  • Save sang-w0o/ed61cbda5ff71fdfd3df3de61fb32dc4 to your computer and use it in GitHub Desktop.
Save sang-w0o/ed61cbda5ff71fdfd3df3de61fb32dc4 to your computer and use it in GitHub Desktop.
grpc_gateway_4.go
func New() {
router := chi.NewRouter()
//..
router.Route("/api/", func(r chi.Router) {
r.Post("/1", func(w http.ResponseWriter, r *http.Request) {
mux.ServeHTTP(w, r)
})
r.Post("/2", func(w http.ResponseWriter, r *http.Request) {
mux.ServeHTTP(w, r)
})
r.Post("/3", func(w http.ResponseWriter, r *http.Request) {
mux.ServeHTTP(w, r)
})
r.Post("/4", func(w http.ResponseWriter, r *http.Request) {
mux.ServeHTTP(w, r)
})
r.Post("/5", func(w http.ResponseWriter, r *http.Request) {
mux.ServeHTTP(w, r)
})
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment