package response import ( "net/http" "github.com/gin-gonic/gin" ) func Response(ctx *gin.Context, httpStatus int, data gin.H) { ctx.HTML(httpStatus, "index.html", data) } func Success(ctx *gin.Context, data gin.H) { Response(ctx, http.StatusOK, data) } func Fail(ctx *gin.Context, data gin.H) { ctx.HTML(http.StatusNotFound, "404.html", data) }