- Building Microservices with Go
- Nic Jackson
- 45字
- 2021-07-15 17:28:03
RedirectHandler
The RedirectHandler function returns a request handler that redirects each request it receives to the given URI using the given status code. The provided code should be in the 3xx range and is usually StatusMovedPermanently, StatusFound, or StatusSeeOther:
func RedirectHandler(url string, code int) Handler