diff --git a/cmd/ingester/app/flags.go b/cmd/ingester/app/flags.go index 44c3a6e73ac..4288553d9a5 100644 --- a/cmd/ingester/app/flags.go +++ b/cmd/ingester/app/flags.go @@ -134,7 +134,7 @@ func (o *Options) InitFromViper(v *viper.Viper) { o.GroupID = v.GetString(KafkaConsumerConfigPrefix + SuffixGroupID) o.Encoding = v.GetString(KafkaConsumerConfigPrefix + SuffixEncoding) - if brokers := v.GetString(DeprecatedKafkaConfigPrefix+SuffixBrokers); brokers != "" { + if brokers := v.GetString(DeprecatedKafkaConfigPrefix + SuffixBrokers); brokers != "" { fmt.Printf("WARNING: found deprecated option %s, please use %s instead\n", DeprecatedKafkaConfigPrefix+SuffixBrokers, KafkaConsumerConfigPrefix+SuffixBrokers, diff --git a/cmd/ingester/app/flags_test.go b/cmd/ingester/app/flags_test.go index baea184b46d..3fbd6539db7 100644 --- a/cmd/ingester/app/flags_test.go +++ b/cmd/ingester/app/flags_test.go @@ -94,4 +94,4 @@ func TestOptionsWithAllFlags(t *testing.T) { assert.Equal(t, []string{"127.0.0.1:9092", "0.0.0:1234"}, o.Brokers) assert.Equal(t, "group1", o.GroupID) assert.Equal(t, kafka.EncodingProto, o.Encoding) -} \ No newline at end of file +} diff --git a/plugin/storage/kafka/options.go b/plugin/storage/kafka/options.go index 93e5bfd129c..3c0edbf952f 100644 --- a/plugin/storage/kafka/options.go +++ b/plugin/storage/kafka/options.go @@ -32,11 +32,11 @@ const ( // EncodingZipkinThrift is used for spans encoded as Zipkin Thrift. EncodingZipkinThrift = "zipkin-thrift" - configPrefix = "kafka.producer" - deprecatedPrefix = "kafka" - suffixBrokers = ".brokers" - suffixTopic = ".topic" - suffixEncoding = ".encoding" + configPrefix = "kafka.producer" + deprecatedPrefix = "kafka" + suffixBrokers = ".brokers" + suffixTopic = ".topic" + suffixEncoding = ".encoding" defaultBroker = "127.0.0.1:9092" defaultTopic = "jaeger-spans" @@ -94,7 +94,7 @@ func (opt *Options) InitFromViper(v *viper.Viper) { opt.topic = v.GetString(configPrefix + suffixTopic) opt.encoding = v.GetString(configPrefix + suffixEncoding) - if brokers := v.GetString(deprecatedPrefix+suffixBrokers); brokers != "" { + if brokers := v.GetString(deprecatedPrefix + suffixBrokers); brokers != "" { fmt.Printf("WARNING: found deprecated option %s, please use %s instead\n", deprecatedPrefix+suffixBrokers, configPrefix+suffixBrokers, diff --git a/plugin/storage/kafka/options_test.go b/plugin/storage/kafka/options_test.go index 95c630398dc..4370f15c497 100644 --- a/plugin/storage/kafka/options_test.go +++ b/plugin/storage/kafka/options_test.go @@ -76,4 +76,4 @@ func TestOptionsWithAllFlags(t *testing.T) { assert.Equal(t, "topic1", opts.topic) assert.Equal(t, []string{"127.0.0.1:9092", "0.0.0:1234"}, opts.config.Brokers) assert.Equal(t, "protobuf", opts.encoding) -} \ No newline at end of file +}