mirror of
https://github.com/nabbar/golib.git
synced 2025-10-13 03:23:47 +08:00
- Fix some lint, style, error
- Pkg Error : change the register part to allow identify if a code is free or still defined - Pkg Error : apply change of register into all modules - Make some optimization
This commit is contained in:
@@ -32,8 +32,15 @@ const (
|
||||
EMPTY_PARAMS errors.CodeError = iota + errors.MIN_PKG_Httpserver
|
||||
)
|
||||
|
||||
var isCodeError = false
|
||||
|
||||
func IsCodeError() bool {
|
||||
return isCodeError
|
||||
}
|
||||
|
||||
func init() {
|
||||
errors.RegisterFctMessage(getMessage)
|
||||
isCodeError = errors.ExistInMapMessage(EMPTY_PARAMS)
|
||||
errors.RegisterIdFctMessage(EMPTY_PARAMS, getMessage)
|
||||
}
|
||||
|
||||
func getMessage(code errors.CodeError) (message string) {
|
||||
|
Reference in New Issue
Block a user