Skip to content

Commit

Permalink
Merge pull request #821 from DiSiqueira/formatting
Browse files Browse the repository at this point in the history
Formatting all files with gofmt -s
  • Loading branch information
wvanbergen authored Feb 7, 2017
2 parents 23ae1c0 + cecb3d9 commit a6d5582
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion async_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (p *asyncProducer) Close() error {

if p.conf.Producer.Return.Successes {
go withRecover(func() {
for _ = range p.successes {
for range p.successes {
}
})
}
Expand Down
4 changes: 2 additions & 2 deletions async_producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func closeProducer(t *testing.T, p AsyncProducer) {

wg.Add(2)
go func() {
for _ = range p.Successes() {
for range p.Successes() {
t.Error("Unexpected message on Successes()")
}
wg.Done()
Expand Down Expand Up @@ -808,7 +808,7 @@ func ExampleAsyncProducer_goroutines() {
wg.Add(1)
go func() {
defer wg.Done()
for _ = range producer.Successes() {
for range producer.Successes() {
successes++
}
}()
Expand Down
4 changes: 2 additions & 2 deletions consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func (child *partitionConsumer) sendError(err error) {
}

func (child *partitionConsumer) dispatcher() {
for _ = range child.trigger {
for range child.trigger {
select {
case <-child.dying:
close(child.trigger)
Expand Down Expand Up @@ -411,7 +411,7 @@ func (child *partitionConsumer) Close() error {
child.AsyncClose()

go withRecover(func() {
for _ = range child.messages {
for range child.messages {
// drain
}
})
Expand Down
2 changes: 1 addition & 1 deletion consumer_group_members_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestConsumerGroupMemberAssignment(t *testing.T) {
amt := &ConsumerGroupMemberAssignment{
Version: 1,
Topics: map[string][]int32{
"one": []int32{0, 2, 4},
"one": {0, 2, 4},
},
UserData: []byte{0x01, 0x02, 0x03},
}
Expand Down
2 changes: 1 addition & 1 deletion mocks/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (pc *PartitionConsumer) Close() error {
wg.Add(1)
go func() {
defer wg.Done()
for _ = range pc.messages {
for range pc.messages {
// drain
}
}()
Expand Down
4 changes: 2 additions & 2 deletions mocks/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ func TestConsumerTopicMetadata(t *testing.T) {
consumer := NewConsumer(trm, nil)

consumer.SetTopicMetadata(map[string][]int32{
"test1": []int32{0, 1, 2, 3},
"test2": []int32{0, 1, 2, 3, 4, 5, 6, 7},
"test1": {0, 1, 2, 3},
"test2": {0, 1, 2, 3, 4, 5, 6, 7},
})

topics, err := consumer.Topics()
Expand Down
6 changes: 3 additions & 3 deletions sync_producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ func TestSyncProducerBatch(t *testing.T) {
}

err = producer.SendMessages([]*ProducerMessage{
&ProducerMessage{
{
Topic: "my_topic",
Value: StringEncoder(TestMessage),
Metadata: "test",
},
&ProducerMessage{
{
Topic: "my_topic",
Value: StringEncoder(TestMessage),
Metadata: "test",
},
&ProducerMessage{
{
Topic: "my_topic",
Value: StringEncoder(TestMessage),
Metadata: "test",
Expand Down

0 comments on commit a6d5582

Please sign in to comment.