From 992c54253f14b1d76766403bb2ca25ede71d5022 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Tue, 18 Jul 2017 11:47:30 +0300 Subject: [PATCH] fixes from gometalinter review --- pubsub/pubsub.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pubsub/pubsub.go b/pubsub/pubsub.go index f5df418a8..52b8361f8 100644 --- a/pubsub/pubsub.go +++ b/pubsub/pubsub.go @@ -110,8 +110,8 @@ func (s *Server) Unsubscribe(ctx context.Context, clientID string, query Query) } } -// Unsubscribe removes all client subscriptions. An error will be returned to -// the caller if the context is canceled. +// UnsubscribeAll removes all client subscriptions. An error will be returned +// to the caller if the context is canceled. func (s *Server) UnsubscribeAll(ctx context.Context, clientID string) error { select { case s.cmds <- cmd{op: unsub, clientID: clientID}: @@ -172,7 +172,7 @@ loop: state.removeAll(cmd.clientID) } case shutdown: - for clientID, _ := range state.clients { + for clientID := range state.clients { state.removeAll(clientID) } break loop @@ -232,7 +232,7 @@ func (state *state) removeAll(clientID string) { return } - for q, _ := range queryMap { + for q := range queryMap { ch := state.queries[q][clientID] close(ch)