数据采集
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mw_init_validator.go 307 B

10 months ago
123456789101112131415161718
  1. package mw
  2. import (
  3. "applet/app/e"
  4. "applet/app/utils"
  5. "fmt"
  6. "github.com/gin-gonic/gin"
  7. )
  8. func InitReqValidator(c *gin.Context) {
  9. // 初始化翻译器
  10. if err := utils.ValidatorTransInitZh(); err != nil {
  11. e.OutErr(c, e.ERR, fmt.Sprintf("init trans failed, err:%v\n", err))
  12. return
  13. }
  14. c.Next()
  15. }