Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename any func to avoid identifier #2272

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (client *client) Broker(brokerID int32) (*Broker, error) {

func (client *client) InitProducerID() (*InitProducerIDResponse, error) {
brokerErrors := make([]error, 0)
for broker := client.any(); broker != nil; broker = client.any() {
for broker := client.anyBroker(); broker != nil; broker = client.anyBroker() {
var response *InitProducerIDResponse
req := &InitProducerIDRequest{}

Expand Down Expand Up @@ -691,7 +691,7 @@ func (client *client) resurrectDeadBrokers() {
client.deadSeeds = nil
}

func (client *client) any() *Broker {
func (client *client) anyBroker() *Broker {
client.lock.RLock()
defer client.lock.RUnlock()

Expand Down Expand Up @@ -895,9 +895,9 @@ func (client *client) tryRefreshMetadata(topics []string, attemptsRemaining int,
return err
}

broker := client.any()
broker := client.anyBroker()
brokerErrors := make([]error, 0)
for ; broker != nil && !pastDeadline(0); broker = client.any() {
for ; broker != nil && !pastDeadline(0); broker = client.anyBroker() {
allowAutoTopicCreation := client.conf.Metadata.AllowAutoTopicCreation
if len(topics) > 0 {
DebugLogger.Printf("client/metadata fetching metadata for %v from broker %s\n", topics, broker.addr)
Expand Down Expand Up @@ -1073,7 +1073,7 @@ func (client *client) getConsumerMetadata(consumerGroup string, attemptsRemainin
}

brokerErrors := make([]error, 0)
for broker := client.any(); broker != nil; broker = client.any() {
for broker := client.anyBroker(); broker != nil; broker = client.anyBroker() {
DebugLogger.Printf("client/coordinator requesting coordinator for consumergroup %s from %s\n", consumerGroup, broker.Addr())

request := new(FindCoordinatorRequest)
Expand Down