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
302 B

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