From 08cf3bf4da96187b8a007434261dc9c2c24e5a2a Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Mon, 25 Jan 2016 03:22:36 +0300 Subject: [PATCH] Rename ambiguous argument --- example/kafka/kafka.go | 8 ++++---- shezmu.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/kafka/kafka.go b/example/kafka/kafka.go index 397284d..6e1e1a5 100644 --- a/example/kafka/kafka.go +++ b/example/kafka/kafka.go @@ -71,14 +71,14 @@ func Shutdown() { } // Subscribe creates a shezmu.Streamer implementation for Kafka messaging queue. -func (s Subscriber) Subscribe(consumer, topic string) shezmu.Streamer { - c, ok := consumers[consumer] +func (s Subscriber) Subscribe(consumerName, topic string) shezmu.Streamer { + c, ok := consumers[consumerName] if !ok { - panic(fmt.Errorf("Consumer %q has no config", consumer)) + panic(fmt.Errorf("Consumer %q has no config", consumerName)) } t, ok := c[topic] 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) diff --git a/shezmu.go b/shezmu.go index 6ee5394..854e0c7 100644 --- a/shezmu.go +++ b/shezmu.go @@ -34,7 +34,7 @@ type Actor func() // Subscriber is the interface that is used by daemons to subscribe to messages. type Subscriber interface { - Subscribe(consumer, topic string) Streamer + Subscribe(consumerName, topic string) Streamer } // Streamer is the interface that wraps message consumers. Error handling