PathPrefixMap accepts a map of string and a handler. The key of "m" is the key, which is the prefix, regular expressions are not valid. The value of "m" is the handler that will be executed if HasPrefix(context.Path). func (ctx *Context) PathPrefixMap(m map[string]context.Handler) bool { path := ct
(r *http.Request)
| 974 | |
| 975 | // GetHost returns the host part of the current URI. |
| 976 | func GetHost(r *http.Request) string { |
| 977 | // contains subdomain. |
| 978 | if host := r.URL.Host; host != "" { |
| 979 | return host |
| 980 | } |
| 981 | return r.Host |
| 982 | } |
| 983 | |
| 984 | // Host returns the host:port part of the request URI, calls the `Request().Host`. |
| 985 | // To get the subdomain part as well use the `Request().URL.Host` method instead. |
no outgoing calls
no test coverage detected
searching dependent graphs…