10 lines
206 B
Go
10 lines
206 B
Go
|
package responses
|
||
|
|
||
|
import "net/http"
|
||
|
|
||
|
// Redirect to a different URL.
|
||
|
func Redirect(w http.ResponseWriter, r *http.Request, url string) {
|
||
|
w.Header().Set("Location", url)
|
||
|
w.WriteHeader(http.StatusFound)
|
||
|
}
|