Skip to content

Commit

Permalink
fix staticchecks
Browse files Browse the repository at this point in the history
  • Loading branch information
zoemccormick committed Mar 20, 2024
1 parent 8fc9060 commit 178da24
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions nsqd/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ func NewChannel(topicName string, channelName string, nsqd *NSQD,
}

if nsqd.getOpts().TopologyRegion != "" {
c.regionLocalMsgChan = make(chan *Message, 0)
c.regionLocalMsgChan = make(chan *Message)
}
if nsqd.getOpts().TopologyZone != "" {
c.zoneLocalMsgChan = make(chan *Message, 0)
c.zoneLocalMsgChan = make(chan *Message)
}

// avoid mem-queue if size == 0 for more consistent ordering
Expand Down
2 changes: 1 addition & 1 deletion nsqd/protocol_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func TestSameZoneConsumerV2(t *testing.T) {
}
}
var doneCount int64
for _ = range done {
for range done {
doneCount += 1
if doneCount == 21 {
break
Expand Down
6 changes: 3 additions & 3 deletions nsqlookupd/registration_db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
func TestRegistrationDB(t *testing.T) {
sec30 := 30 * time.Second
beginningOfTime := time.Unix(1348797047, 0)
pi1 := &PeerInfo{beginningOfTime.UnixNano(), "1", "remote_addr:1", "host", "b_addr", 1, 2, "v1"}
pi2 := &PeerInfo{beginningOfTime.UnixNano(), "2", "remote_addr:2", "host", "b_addr", 2, 3, "v1"}
pi3 := &PeerInfo{beginningOfTime.UnixNano(), "3", "remote_addr:3", "host", "b_addr", 3, 4, "v1"}
pi1 := &PeerInfo{beginningOfTime.UnixNano(), "1", "remote_addr:1", "host", "b_addr", 1, 2, "v1", "", ""}
pi2 := &PeerInfo{beginningOfTime.UnixNano(), "2", "remote_addr:2", "host", "b_addr", 2, 3, "v1", "", ""}
pi3 := &PeerInfo{beginningOfTime.UnixNano(), "3", "remote_addr:3", "host", "b_addr", 3, 4, "v1", "", ""}
p1 := &Producer{pi1, false, beginningOfTime}
p2 := &Producer{pi2, false, beginningOfTime}
p3 := &Producer{pi3, false, beginningOfTime}
Expand Down

0 comments on commit 178da24

Please sign in to comment.