使い方
-
echo.WrapHandler(http.HandlerFunc(Redirect))
のような感じで使う
ソース
package main
import (
"net/http"
"github.com/labstack/echo"
)
func main() {
e := echo.New()
e.GET("/", echo.WrapHandler(http.HandlerFunc(Redirect)))
e.Logger.Fatal(e.Start(":1323"))
}
func Redirect(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "https://vamdemicsystem.black", http.StatusFound)
}