9 lines
197 B
Go
9 lines
197 B
Go
package server
|
|
|
|
import "net/http"
|
|
|
|
func (h *Server) redirect(path string, code int) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
http.Redirect(w, r, path, code)
|
|
}
|
|
}
|