- Building Microservices with Go
- Nic Jackson
- 49字
- 2021-07-15 17:28:03
StripPrefix
The StripPrefix function returns a handler that serves HTTP requests by removing the given prefix from the request URL's path and then invoking h handler. If a path does not exist, then StripPrefix will reply with an HTTP 404 not found error:
func StripPrefix(prefix string, h Handler) Handler