RouteHeaders is a neat little header-based router that allows you to direct the flow of a request through a middleware stack based on a request header. For example, lets say you'd like to setup multiple routers depending on the request Host header, you could then do something as so: r := chi.NewR
()
| 40 | // })). |
| 41 | // Handler) |
| 42 | func RouteHeaders() HeaderRouter { |
| 43 | return HeaderRouter{} |
| 44 | } |
| 45 | |
| 46 | type HeaderRouter map[string][]HeaderRoute |
| 47 |
no outgoing calls