feat:完善项目
This commit is contained in:
@ -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,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user