feat:完善项目

This commit is contained in:
henry
2021-11-18 09:51:39 +08:00
parent 09cc956d42
commit bcceef741b
15 changed files with 196 additions and 58 deletions

View File

@ -4,7 +4,8 @@ import "encoding/json"
type WorkNotice struct {
Prefix string `json:"prefix"`
Message interface{} `json:"message"`
Data interface{} `json:"data"`
Message string `json:"message"`
}
func (this *WorkNotice) ToBytes() []byte {
@ -12,9 +13,10 @@ func (this *WorkNotice) ToBytes() []byte {
return out
}
func NewWorkNotice(msg interface{}) *WorkNotice {
func NewWorkNotice(msg string, data interface{}) *WorkNotice {
return &WorkNotice{
Prefix: "work",
Message: msg,
Data: data,
}
}