Skip to content

Commit

Permalink
FIX: make lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
git-hulk committed May 31, 2019
1 parent 4cc1086 commit e9348db
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ func (tc *topicConsumer) assignPartitions() ([]int32, error) {
}

func (tc *topicConsumer) getPartitionNum() (int32, error) {
if saramaConsumer, ok := tc.owner.saramaConsumers[tc.name]; !ok {
saramaConsumer, ok := tc.owner.saramaConsumers[tc.name]
if !ok {
return 0, errors.New("sarama conumser was not found")
} else {
partitions, err := saramaConsumer.Partitions(tc.name)
if err != nil {
return 0, err
}
return int32(len(partitions)), nil
}
partitions, err := saramaConsumer.Partitions(tc.name)
if err != nil {
return 0, err
}
return int32(len(partitions)), nil
}

func (tc *topicConsumer) getOffsets() map[int32]interface{} {
Expand Down

0 comments on commit e9348db

Please sign in to comment.