You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
320 B

2 years ago
package service
import (
2 years ago
"sendmsg/common"
2 years ago
"sendmsg/message"
)
type Service struct {
Body message.Body
}
2 years ago
func (s Service) Run() {
2 years ago
common.Log.Printf("[service] start excute...")
send(s.Body)
2 years ago
}
func send(body message.Body) {
m := message.GetType()
if m == nil || !message.Enabled() {
return
}
m.Send(body)
}