Rename ambiguous argument
This commit is contained in:
		
							parent
							
								
									9269f41051
								
							
						
					
					
						commit
						08cf3bf4da
					
				| @ -71,14 +71,14 @@ func Shutdown() { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // Subscribe creates a shezmu.Streamer implementation for Kafka messaging queue. | // Subscribe creates a shezmu.Streamer implementation for Kafka messaging queue. | ||||||
| func (s Subscriber) Subscribe(consumer, topic string) shezmu.Streamer { | func (s Subscriber) Subscribe(consumerName, topic string) shezmu.Streamer { | ||||||
| 	c, ok := consumers[consumer] | 	c, ok := consumers[consumerName] | ||||||
| 	if !ok { | 	if !ok { | ||||||
| 		panic(fmt.Errorf("Consumer %q has no config", consumer)) | 		panic(fmt.Errorf("Consumer %q has no config", consumerName)) | ||||||
| 	} | 	} | ||||||
| 	t, ok := c[topic] | 	t, ok := c[topic] | ||||||
| 	if !ok { | 	if !ok { | ||||||
| 		panic(fmt.Errorf("Consumer %q has no config for topic %q", consumer, topic)) | 		panic(fmt.Errorf("Consumer %q has no config for topic %q", consumerName, topic)) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	pc, err := kafkaConsumer.ConsumePartition(topic, t.Partition, t.Offset) | 	pc, err := kafkaConsumer.ConsumePartition(topic, t.Partition, t.Offset) | ||||||
|  | |||||||
| @ -34,7 +34,7 @@ type Actor func() | |||||||
| 
 | 
 | ||||||
| // Subscriber is the interface that is used by daemons to subscribe to messages. | // Subscriber is the interface that is used by daemons to subscribe to messages. | ||||||
| type Subscriber interface { | type Subscriber interface { | ||||||
| 	Subscribe(consumer, topic string) Streamer | 	Subscribe(consumerName, topic string) Streamer | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // Streamer is the interface that wraps message consumers. Error handling | // Streamer is the interface that wraps message consumers. Error handling | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user