Documentation ¶
Index ¶
- Constants
- Variables
- type HandlerFunc
- type MatchedRoute
- type Route
- type Router
- func (r *Router) Get(name string) *Route
- func (r *Router) GetRoute(name string) *Route
- func (r *Router) GetStrictSlash() bool
- func (r *Router) Handle(pattern string, handler http.Handler) *Route
- func (r *Router) HandleFunc(pattern string, f HandlerFunc) *Route
- func (r *Router) ServeHTTP(rw http.ResponseWriter, req *http.Request)
- func (r *Router) StrictSlash(strictSlash bool) *Router
- func (r *Router) UrlFor(name string, params map[string]interface{}) (string, bool)
Constants ¶
View Source
const (
HTTPMethodGET = "GET"
)
Variables ¶
View Source
var ( DefaultConverter = "default" DefaultConverters = []string{ "default", "[^/]+", "string", "[^/]+", "int", "\\d+", "path", "[^/].*", } )
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
type HandlerFunc func(http.ResponseWriter, *http.Request)
type MatchedRoute ¶
type MatchedRoute struct {
// contains filtered or unexported fields
}
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
func (*Route) GetMethods ¶
func (*Route) GetStrictSlash ¶
func (*Route) StrictSlash ¶
type Router ¶
func (*Router) GetStrictSlash ¶
func (*Router) HandleFunc ¶
func (r *Router) HandleFunc(pattern string, f HandlerFunc) *Route
func (*Router) StrictSlash ¶
Click to show internal directories.
Click to hide internal directories.