code: func extractChannels(a []*emittedGossipMessage) []common.ChainID {
  	channels := []common.ChainID{}
  	for _, m := range a {
  		if len(m.Channel) == 0 {
  			continue
  		}
  		sameChan := func(a interface{}, b interface{}) bool {
  			return bytes.Equal(a.(common.ChainID), b.(common.ChainID))
  		}
  		if util.IndexInSlice(channels, common.ChainID(m.Channel), sameChan) == -1 {
  			channels = append(channels, common.ChainID(m.Channel))
  		}
  	}
  	return channels
  }
docs: // extractChannels returns a slice with all channels
  // of all given GossipMessages