|
- package mw
-
- import (
- "applet/app/e"
- "applet/app/utils"
- "fmt"
- "github.com/gin-gonic/gin"
- )
-
- func InitReqValidator(c *gin.Context) {
- // 初始化翻译器
- if err := utils.ValidatorTransInitZh(); err != nil {
- e.OutErr(c, e.ERR, fmt.Sprintf("init trans failed, err:%v\n", err))
- return
- }
-
- c.Next()
- }
|