add title errcode

This commit is contained in:
Havoc412 2024-11-06 09:16:18 +08:00
parent f26c9c0528
commit cd0d1595b8
3 changed files with 11 additions and 0 deletions

View File

@ -5,6 +5,7 @@ const (
ErrAnimal
ErrUser
ErrEncounter
ErrNlp
)
const (

View File

@ -10,6 +10,7 @@ func init() {
AnimalMsgInit(ErrMsg)
UserMsgInit(ErrMsg)
EnocunterMsgInit(ErrMsg)
NlpMsgInit(ErrMsg)
}
func GeneralMsgInit(m msg) {

View File

@ -0,0 +1,9 @@
package errcode
const (
ErrNoContent = ErrNlp + iota
)
func NlpMsgInit(m msg) {
m[ErrNoContent] = "内容为空"
}