Documentation
¶
Overview ¶
Package host provide host based routing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Must ¶
func Must(hosts ...string) func(http.HandlerFunc) http.HandlerFunc
Must return middleware that only allowed host that specified in hosts
Types ¶
type H ¶
type H map[string]http.HandlerFunc
H is type for mapping host and its handler
func (H) Compile ¶
func (h H) Compile(def http.HandlerFunc) http.HandlerFunc
Compile into single http.HandlerFunc. if def is nil, default handler is defhandler.StatusBadRequest
Click to show internal directories.
Click to hide internal directories.