func (gs *gossipSenders) Sender(channelName string, makeGossipSender func(sender protocolSender, stop <-chan struct{}) *gossipSender) *gossipSender {
	gs.Lock()
	defer gs.Unlock()
	s, found := gs.senders[channelName]
	if !found {
		s = makeGossipSender(gs.sender, gs.stop)
		gs.senders[channelName] = s
	}
	return s
}
func (gs *gossipSenders) Sender(channelName string, makeGossipSender func(sender protocolSender, stop <-chan struct{}) *gossipSender) *gossipSender {
	gs.Lock()
	defer gs.Unlock()
	s, found := gs.senders[channelName]
	if !found {
		s = makeGossipSender(gs.sender, gs.stop)
		gs.senders[channelName] = s
	}
	return s
}
func ( gs * gossipSenders ) Sender ( channelName string , makeGossipSender func ( sender protocolSender , stop <- chan struct { } ) * gossipSender ) * gossipSender { gs . Lock ( ) defer gs . Unlock ( ) s , found := gs . senders [ channelName ] if ! found { s = makeGossipSender ( gs . sender , gs . stop ) gs . senders [ channelName ] = s } return s }
// Sender yields the GossipSender for the named channel.
// It will use the factory function if no sender yet exists.
Sender yields the GossipSender for the named channel . It will use the factory function if no sender yet exists .