v0.0.174
This commit is contained in:
@@ -1,24 +1,23 @@
|
||||
package ginext
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func RedirectFound(newuri string) gin.HandlerFunc {
|
||||
return func(g *gin.Context) {
|
||||
g.Redirect(http.StatusFound, newuri)
|
||||
func RedirectFound(newuri string) WHandlerFunc {
|
||||
return func(pctx PreContext) HTTPResponse {
|
||||
return Redirect(http.StatusFound, newuri)
|
||||
}
|
||||
}
|
||||
|
||||
func RedirectTemporary(newuri string) gin.HandlerFunc {
|
||||
return func(g *gin.Context) {
|
||||
g.Redirect(http.StatusTemporaryRedirect, newuri)
|
||||
func RedirectTemporary(newuri string) WHandlerFunc {
|
||||
return func(pctx PreContext) HTTPResponse {
|
||||
return Redirect(http.StatusTemporaryRedirect, newuri)
|
||||
}
|
||||
}
|
||||
|
||||
func RedirectPermanent(newuri string) gin.HandlerFunc {
|
||||
return func(g *gin.Context) {
|
||||
g.Redirect(http.StatusPermanentRedirect, newuri)
|
||||
func RedirectPermanent(newuri string) WHandlerFunc {
|
||||
return func(pctx PreContext) HTTPResponse {
|
||||
return Redirect(http.StatusPermanentRedirect, newuri)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user