From 8c9a66aa7f4fa47586edb75b026eee583f4ee372 Mon Sep 17 00:00:00 2001 From: Matt Reiferson Date: Wed, 1 Aug 2018 15:55:10 -0700 Subject: [PATCH] nsqd: cleanup some superfluous comments in http.go --- nsqd/http.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/nsqd/http.go b/nsqd/http.go index 075dc0033..0a9728331 100644 --- a/nsqd/http.go +++ b/nsqd/http.go @@ -486,24 +486,19 @@ func (s *httpServer) doStats(w http.ResponseWriter, req *http.Request, ps httpro startTime := s.ctx.nsqd.GetStartTime() uptime := time.Since(startTime) - // If we WERE given a topic-name, remove stats for all the other topics: + // filter by topic (if specified) if len(topicName) > 0 { - // Find the desired-topic-index: for _, topicStats := range stats { if topicStats.TopicName == topicName { - // If we WERE given a channel-name, remove stats for all the other channels: + // filter by channel (if specified) if len(channelName) > 0 { - // Find the desired-channel: for _, channelStats := range topicStats.Channels { if channelStats.ChannelName == channelName { topicStats.Channels = []ChannelStats{channelStats} - // We've got the channel we were looking for: break } } } - - // We've got the topic we were looking for: stats = []TopicStats{topicStats} break }