package code import ( _ "embed" "mini-chat/configs" ) //go:embed code.go var ByteCodeFile []byte // Failure 错误时返回结构 type Failure struct { Code int `json:"code"` // 业务码 Message string `json:"message"` // 描述信息 } const ( ServerError = 10101 ParamBindError = 10102 JWTAuthVerifyError = 10103 AdminLoginError = 20101 ) func Text(code int) string { lang := configs.Get().Language.Local if lang == configs.ZhCN { return zhCNText[code] } return zhCNText[code] }