mirror of
https://github.com/1f349/violet.git
synced 2024-11-09 22:22:50 +00:00
16 lines
194 B
Go
16 lines
194 B
Go
package target
|
|
|
|
import (
|
|
"net/http"
|
|
"net/url"
|
|
)
|
|
|
|
type Redirect struct {
|
|
url.URL
|
|
Code int
|
|
}
|
|
|
|
func (r Redirect) Handler() http.Handler {
|
|
return http.RedirectHandler(r.URL.String(), r.Code)
|
|
}
|