feat:完善项目
This commit is contained in:
20
app/handle/notice.go
Normal file
20
app/handle/notice.go
Normal file
@ -0,0 +1,20 @@
|
||||
package handle
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
type WorkNotice struct {
|
||||
Prefix string `json:"prefix"`
|
||||
Message interface{} `json:"message"`
|
||||
}
|
||||
|
||||
func (this *WorkNotice) ToBytes() []byte {
|
||||
out, _ := json.Marshal(this)
|
||||
return out
|
||||
}
|
||||
|
||||
func NewWorkNotice(msg interface{}) *WorkNotice {
|
||||
return &WorkNotice{
|
||||
Prefix: "work",
|
||||
Message: msg,
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user