Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TranslateApp = &Translate{}
定义一个全局翻译器TranslateApp
Functions ¶
func BindAndValid ¶
BindAndValid binds and validates data
Types ¶
type Gin ¶
Gin struct
type Response ¶
type Response struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
返回的对象
type Translate ¶
type Translate struct { Trans ut.Translator Valid *validator.Validate }
Click to show internal directories.
Click to hide internal directories.