-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
i := 0 | ||
count := len(h.handlers) | ||
topics := make([]string, count) | ||
for t := range h.handlers { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Why not using the for i, t := range h.handlers...
syntax?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because handlers is a map, if you use that syntax i
will be a key and t
will be its value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I thought it was a list. Sorry 🙊
consumer/handler/collection.go
Outdated
type Collection struct { | ||
sync.RWMutex | ||
|
||
logger *logrus.Entry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the logger
field here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Removed.
handler: Migrate handlers collection
handler: Migrate handlers collection
This PR fixes: #9
I have taken the following steps:
Handlers
struct from kafka-go