Makes code style consistent in kafka client after refresh metadata
@@ -288,7 +288,8 @@ func (client *client) Partitions(topic string) ([]int32, error) {
partitions = client.cachedPartitions(topic, allPartitions)
}
- if partitions == nil {
+ // no partitions found after refresh metadata
+ if len(partitions) == 0 {
return nil, ErrUnknownTopicOrPartition