Documentation ¶
Overview ¶
Override implements a http.Handler, that enables prefix matching based routing. For example, if you want to serve an static directory using http.FileServer and http.Dir, but you want to redirect the path "/" to your dynamic main page, and the path "/wiki/<wiki-page>" to your Wiki, and the path "/<yyyy>/<mm>/<dd>/<title>" to your blog entrys, you can use "override" to do the job.
Index ¶
- type Overrider
- func (o *Overrider) Add(prefix string, h http.Handler)
- func (o *Overrider) AddExact(exact string, h http.Handler)
- func (o *Overrider) AddRegexp(re string, h http.Handler) error
- func (o *Overrider) AddRegexpPOSIX(re string, h http.Handler) error
- func (o *Overrider) ServeHTTP(resp http.ResponseWriter, req *http.Request)
- type Patterned
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Overrider ¶
func (*Overrider) AddRegexpPOSIX ¶
Click to show internal directories.
Click to hide internal directories.