Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TableRouter ¶
type TableRouter struct {
// contains filtered or unexported fields
}
TableRouter is regexp table-based http router Inspired by https://github.com/benhoyt/go-routing/tree/master/retable
func (*TableRouter) AddRoute ¶
func (tr *TableRouter) AddRoute(method, pattern string, handler http.Handler)
AddRoute adds given handler for route matching given pattern and method
func (*TableRouter) ServeHTTP ¶
func (tr *TableRouter) ServeHTTP(w http.ResponseWriter, r *http.Request)
Serve routes the given request
Click to show internal directories.
Click to hide internal directories.