package pkg type signal struct{} var def signal type SignalChan chan signal func NewSingleChan() SignalChan { return make(chan signal) } func NewBufferSingleChan(size int) SignalChan { return make(chan signal, size) } func (c SignalChan) Send() { c <- def }