Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildBy = time.Now()
BuildBy BuildBy
View Source
var DuplicateEntryKey, _ = regexp.Compile(
`Duplicate entry '(.*)' for key '(.*)\.(.*)'`,
)
DuplicateEntryKey DuplicateEntryKey
View Source
var ( ErrCodeTextArray = []ErrorCodeTextInterface{ ErrorCodeText, } )
View Source
var ErrorCodeText = ErrorCodeTextInterface{ Success: "获取成功", Errors: "遇到错误", LoginSuccess: "登陆成功", AuthedError: "登陆超时", NotFound: "没有数据", RepeatEmail: "邮箱已存在", RepeatUserName: "用户名已存在", BindJSONErr: "绑定失败,请检查参数", NoRoute: "路由不存在", NoMethod: "方法不存在", }
ErrorCodeText 错误提示
View Source
var RecoverErrHtml = false
View Source
var RecoverErrTemplateName = "err/error.html"
Functions ¶
func IsReqFromHTML ¶ added in v1.0.8
IsReqFromHTML ReqFromHtml
func PushErrCodeTextMap ¶ added in v1.0.8
func PushErrCodeTextMap(_map ErrorCodeTextInterface)
Types ¶
type ErrCode ¶
type ErrCode int
ErrCode 错误码类型
const ( // Success Success Success ErrCode = 1 // Errors 失败 Errors ErrCode = -1 // NoRoute NoRoute NoRoute ErrCode = http.StatusNotFound // NoMethod NoMethod NoMethod ErrCode = http.StatusMethodNotAllowed )
type ErrorCodeTextInterface ¶ added in v1.0.8
Click to show internal directories.
Click to hide internal directories.