Preparing report...

Report for github.com/nsqio/nsq

A+    Excellent!    Found 66 issues across 113 files

Tweet

gofmt99%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


golint44%

Golint is a linter for Go source code.

    • nsq/internal/quantile/aggregate.go
    • Line 9: warning: exported type E2eProcessingLatencyAggregate should have comment or be unexported (golint)
    • Line 17: warning: exported method E2eProcessingLatencyAggregate.UnmarshalJSON should have comment or be unexported (golint)
    • nsq/nsqadmin/nsqadmin.go
    • Line 25: warning: exported type NSQAdmin should have comment or be unexported (golint)
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • Line 147: warning: exported method NSQAdmin.RealHTTPAddr should have comment or be unexported (golint)
    • Line 170: warning: exported method NSQAdmin.Main should have comment or be unexported (golint)
    • Line 192: warning: exported method NSQAdmin.Exit should have comment or be unexported (golint)
    • nsq/internal/pqueue/pqueue.go
    • Line 7: warning: exported type Item should have comment or be unexported (golint)
    • Line 13: warning: comment on exported type PriorityQueue should be of the form "PriorityQueue ..." (with optional leading article) (golint)
    • Line 17: warning: exported function New should have comment or be unexported (golint)
    • Line 35: warning: exported method PriorityQueue.Push should have comment or be unexported (golint)
    • Line 49: warning: exported method PriorityQueue.Pop should have comment or be unexported (golint)
    • Line 63: warning: exported method PriorityQueue.PeekAndShift should have comment or be unexported (golint)
    • nsq/nsqd/guid.go
    • Line 30: warning: exported var ErrTimeBackwards should have comment or be unexported (golint)
    • Line 31: warning: exported var ErrSequenceExpired should have comment or be unexported (golint)
    • Line 32: warning: exported var ErrIDBackwards should have comment or be unexported (golint)
    • Line 45: warning: exported function NewGUIDFactory should have comment or be unexported (golint)
    • nsq/nsqd/stats.go
    • Line 11: warning: exported type Stats should have comment or be unexported (golint)
    • Line 16: warning: exported type ClientStats should have comment or be unexported (golint)
    • Line 20: warning: exported type TopicStats should have comment or be unexported (golint)
    • Line 32: warning: exported function NewTopicStats should have comment or be unexported (golint)
    • Line 46: warning: exported type ChannelStats should have comment or be unexported (golint)
    • Line 62: warning: exported function NewChannelStats should have comment or be unexported (golint)
    • Line 87: warning: exported type Topics should have comment or be unexported (golint)
    • Line 89: warning: exported method Topics.Len should have comment or be unexported (golint)
    • Line 90: warning: exported method Topics.Swap should have comment or be unexported (golint)
    • Line 92: warning: exported type TopicsByName should have comment or be unexported (golint)
    • Line 96: warning: exported method TopicsByName.Less should have comment or be unexported (golint)
    • Line 98: warning: exported type Channels should have comment or be unexported (golint)
    • Line 100: warning: exported method Channels.Len should have comment or be unexported (golint)
    • Line 101: warning: exported method Channels.Swap should have comment or be unexported (golint)
    • Line 103: warning: exported type ChannelsByName should have comment or be unexported (golint)
    • Line 107: warning: exported method ChannelsByName.Less should have comment or be unexported (golint)
    • Line 109: warning: exported method NSQD.GetStats should have comment or be unexported (golint)
    • nsq/nsqadmin/logger.go
    • Line 7: warning: exported type Logger should have comment or be unexported (golint)
    • Line 10: warning: exported const LOG_DEBUG should have comment (or a comment on this block) or be unexported (golint)
    • nsq/nsqd/logger.go
    • Line 7: warning: exported type Logger should have comment or be unexported (golint)
    • Line 10: warning: exported const LOG_DEBUG should have comment (or a comment on this block) or be unexported (golint)
    • nsq/internal/stringy/slice.go
    • Line 3: warning: exported function Add should have comment or be unexported (golint)
    • Line 13: warning: exported function Union should have comment or be unexported (golint)
    • Line 29: warning: exported function Uniq should have comment or be unexported (golint)
    • nsq/internal/protocol/errors.go
    • Line 3: warning: exported type ChildErr should have comment or be unexported (golint)
    • Line 32: warning: exported type FatalClientErr should have comment or be unexported (golint)
    • Line 48: warning: comment on exported function NewFatalClientErr should be of the form "NewFatalClientErr ..." (golint)
    • nsq/nsqlookupd/nsqlookupd.go
    • Line 16: warning: exported type NSQLookupd should have comment or be unexported (golint)
    • Line 26: warning: exported function New should have comment or be unexported (golint)
    • Line 78: warning: exported method NSQLookupd.RealTCPAddr should have comment or be unexported (golint)
    • Line 82: warning: exported method NSQLookupd.RealHTTPAddr should have comment or be unexported (golint)
    • Line 86: warning: exported method NSQLookupd.Exit should have comment or be unexported (golint)
    • nsq/apps/nsq_to_file/file_logger.go
    • Line 18: warning: exported type FileLogger should have comment or be unexported (golint)
    • Line 40: warning: exported function NewFileLogger should have comment or be unexported (golint)
    • Line 76: warning: exported method FileLogger.HandleMessage should have comment or be unexported (golint)
    • Line 163: warning: exported method FileLogger.Close should have comment or be unexported (golint)
    • Line 233: warning: exported method FileLogger.Sync should have comment or be unexported (golint)
    • nsq/nsqd/nsqd.go
    • Line 31: warning: exported const TLSNotRequired should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported type NSQD should have comment or be unexported (golint)
    • Line 77: warning: exported function New should have comment or be unexported (golint)
    • Line 193: warning: exported method NSQD.RealTCPAddr should have comment or be unexported (golint)
    • Line 197: warning: exported method NSQD.RealHTTPAddr should have comment or be unexported (golint)
    • Line 201: warning: exported method NSQD.RealHTTPSAddr should have comment or be unexported (golint)
    • Line 205: warning: exported method NSQD.SetHealth should have comment or be unexported (golint)
    • Line 209: warning: exported method NSQD.IsHealthy should have comment or be unexported (golint)
    • Line 213: warning: exported method NSQD.GetError should have comment or be unexported (golint)
    • Line 218: warning: exported method NSQD.GetHealth should have comment or be unexported (golint)
    • Line 226: warning: exported method NSQD.GetStartTime should have comment or be unexported (golint)
    • Line 230: warning: exported method NSQD.Main should have comment or be unexported (golint)
    • Line 306: warning: exported method NSQD.LoadMetadata should have comment or be unexported (golint)
    • Line 350: warning: exported method NSQD.PersistMetadata should have comment or be unexported (golint)
    • Line 405: warning: exported method NSQD.Exit should have comment or be unexported (golint)
    • Line 539: warning: exported method NSQD.Notify should have comment or be unexported (golint)
    • Line 740: warning: exported method NSQD.IsAuthEnabled should have comment or be unexported (golint)
    • nsq/internal/app/float_array.go
    • Line 11: warning: exported type FloatArray should have comment or be unexported (golint)
    • Line 13: warning: exported method FloatArray.Get should have comment or be unexported (golint)
    • Line 15: warning: exported method FloatArray.Set should have comment or be unexported (golint)
    • nsq/internal/clusterinfo/data.go
    • Line 18: warning: exported type PartialErr should have comment or be unexported (golint)
    • Line 23: warning: exported type ErrList should have comment or be unexported (golint)
    • Line 33: warning: exported method ErrList.Errors should have comment or be unexported (golint)
    • Line 37: warning: exported type ClusterInfo should have comment or be unexported (golint)
    • Line 42: warning: exported function New should have comment or be unexported (golint)
    • Line 672: warning: exported method ClusterInfo.CreateTopicChannel should have comment or be unexported (golint)
    • Line 724: warning: exported method ClusterInfo.DeleteTopic should have comment or be unexported (golint)
    • Line 765: warning: exported method ClusterInfo.DeleteChannel should have comment or be unexported (golint)
    • Line 805: warning: exported method ClusterInfo.PauseTopic should have comment or be unexported (golint)
    • Line 810: warning: exported method ClusterInfo.UnPauseTopic should have comment or be unexported (golint)
    • Line 815: warning: exported method ClusterInfo.PauseChannel should have comment or be unexported (golint)
    • Line 820: warning: exported method ClusterInfo.UnPauseChannel should have comment or be unexported (golint)
    • Line 825: warning: exported method ClusterInfo.EmptyTopic should have comment or be unexported (golint)
    • Line 830: warning: exported method ClusterInfo.EmptyChannel should have comment or be unexported (golint)
    • Line 862: warning: exported method ClusterInfo.GetProducers should have comment or be unexported (golint)
    • Line 869: warning: exported method ClusterInfo.GetTopicProducers should have comment or be unexported (golint)
    • nsq/nsqlookupd/client_v1.go
    • Line 7: warning: exported type ClientV1 should have comment or be unexported (golint)
    • Line 12: warning: exported function NewClientV1 should have comment or be unexported (golint)
    • nsq/nsqlookupd/options.go
    • Line 11: warning: exported type Options should have comment or be unexported (golint)
    • Line 24: warning: exported function NewOptions should have comment or be unexported (golint)
    • nsq/nsqd/message.go
    • Line 11: warning: exported const MsgIDLength should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type MessageID should have comment or be unexported (golint)
    • Line 17: warning: exported type Message should have comment or be unexported (golint)
    • Line 31: warning: exported function NewMessage should have comment or be unexported (golint)
    • Line 39: warning: exported method Message.WriteTo should have comment or be unexported (golint)
    • nsq/internal/statsd/client.go
    • Line 8: warning: exported type Client should have comment or be unexported (golint)
    • Line 13: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 20: warning: exported method Client.Incr should have comment or be unexported (golint)
    • Line 24: warning: exported method Client.Decr should have comment or be unexported (golint)
    • Line 28: warning: exported method Client.Timing should have comment or be unexported (golint)
    • Line 32: warning: exported method Client.Gauge should have comment or be unexported (golint)
    • nsq/nsqlookupd/lookup_protocol_v1.go
    • Line 20: warning: exported type LookupProtocolV1 should have comment or be unexported (golint)
    • Line 24: warning: exported method LookupProtocolV1.NewClient should have comment or be unexported (golint)
    • Line 28: warning: exported method LookupProtocolV1.IOLoop should have comment or be unexported (golint)
    • Line 89: warning: exported method LookupProtocolV1.Exec should have comment or be unexported (golint)
    • Line 125: warning: exported method LookupProtocolV1.REGISTER should have comment or be unexported (golint)
    • Line 151: warning: exported method LookupProtocolV1.UNREGISTER should have comment or be unexported (golint)
    • Line 200: warning: exported method LookupProtocolV1.IDENTIFY should have comment or be unexported (golint)
    • Line 263: warning: exported method LookupProtocolV1.PING should have comment or be unexported (golint)
    • nsq/apps/nsq_tail/nsq_tail.go
    • Line 37: warning: exported type TailHandler should have comment or be unexported (golint)
    • Line 43: warning: exported method TailHandler.HandleMessage should have comment or be unexported (golint)
    • nsq/internal/app/string_array.go
    • Line 7: warning: exported type StringArray should have comment or be unexported (golint)
    • Line 9: warning: exported method StringArray.Get should have comment or be unexported (golint)
    • Line 11: warning: exported method StringArray.Set should have comment or be unexported (golint)
    • nsq/nsqlookupd/logger.go
    • Line 7: warning: exported type Logger should have comment or be unexported (golint)
    • Line 10: warning: exported const LOG_DEBUG should have comment (or a comment on this block) or be unexported (golint)
    • nsq/internal/quantile/quantile.go
    • Line 12: warning: exported type Result should have comment or be unexported (golint)
    • Line 25: warning: exported type Quantile should have comment or be unexported (golint)
    • Line 36: warning: exported function New should have comment or be unexported (golint)
    • Line 50: warning: exported method Quantile.Result should have comment or be unexported (golint)
    • Line 66: warning: exported method Quantile.Insert should have comment or be unexported (golint)
    • Line 78: warning: exported method Quantile.QueryHandler should have comment or be unexported (golint)
    • Line 92: warning: exported method Quantile.IsDataStale should have comment or be unexported (golint)
    • Line 96: warning: exported method Quantile.Merge should have comment or be unexported (golint)
    • nsq/internal/http_api/api_request.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 16: warning: comment on exported function NewDeadlineTransport should be of the form "NewDeadlineTransport ..." (golint)
    • Line 33: warning: exported type Client should have comment or be unexported (golint)
    • Line 37: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 87: warning: comment on exported method Client.POSTV1 should be of the form "POSTV1 ..." (golint)
    • nsq/nsqadmin/http.go
    • Line 34: warning: comment on exported function NewSingleHostReverseProxy should be of the form "NewSingleHostReverseProxy ..." (golint)
    • Line 58: warning: exported function NewHTTPServer should have comment or be unexported (golint)
    • nsq/internal/test/assertions.go
    • Line 10: warning: exported function Equal should have comment or be unexported (golint)
    • Line 19: warning: exported function NotEqual should have comment or be unexported (golint)
    • Line 28: warning: exported function Nil should have comment or be unexported (golint)
    • Line 37: warning: exported function NotNil should have comment or be unexported (golint)
    • nsq/internal/http_api/req_params.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 10: warning: exported type ReqParams should have comment or be unexported (golint)
    • Line 15: warning: exported function NewReqParams should have comment or be unexported (golint)
    • Line 29: warning: exported method ReqParams.Get should have comment or be unexported (golint)
    • Line 37: warning: exported method ReqParams.GetAll should have comment or be unexported (golint)
    • nsq/apps/nsq_to_http/http.go
    • Line 18: warning: exported function HTTPGet should have comment or be unexported (golint)
    • Line 30: warning: exported function HTTPPost should have comment or be unexported (golint)
    • nsq/internal/auth/authorizations.go
    • Line 16: warning: exported type Authorization should have comment or be unexported (golint)
    • Line 22: warning: exported type State should have comment or be unexported (golint)
    • Line 30: warning: exported method Authorization.HasPermission should have comment or be unexported (golint)
    • Line 39: warning: exported method Authorization.IsAllowed should have comment or be unexported (golint)
    • Line 65: warning: exported method State.IsAllowed should have comment or be unexported (golint)
    • Line 74: warning: exported method State.IsExpired should have comment or be unexported (golint)
    • Line 81: warning: exported function QueryAnyAuthd should have comment or be unexported (golint)
    • Line 97: warning: exported function QueryAuthd should have comment or be unexported (golint)
    • nsq/internal/clusterinfo/types.go
    • Line 14: warning: exported type ProducerTopic should have comment or be unexported (golint)
    • Line 19: warning: exported type ProducerTopics should have comment or be unexported (golint)
    • Line 25: warning: exported type Producer should have comment or be unexported (golint)
    • Line 72: warning: exported method Producer.Address should have comment or be unexported (golint)
    • Line 79: warning: exported method Producer.HTTPAddress should have comment or be unexported (golint)
    • Line 83: warning: exported method Producer.TCPAddress should have comment or be unexported (golint)
    • Line 94: warning: exported type TopicStats should have comment or be unexported (golint)
    • Line 109: warning: exported method TopicStats.Add should have comment or be unexported (golint)
    • Line 141: warning: exported type ChannelStats should have comment or be unexported (golint)
    • Line 163: warning: exported method ChannelStats.Add should have comment or be unexported (golint)
    • Line 191: warning: exported type ClientStats should have comment or be unexported (golint)
    • Line 231: warning: exported method ClientStats.HasUserAgent should have comment or be unexported (golint)
    • Line 231: warning: receiver name c should be consistent with previous receiver name s for ClientStats (golint)
    • Line 235: warning: exported method ClientStats.HasSampleRate should have comment or be unexported (golint)
    • Line 235: warning: receiver name c should be consistent with previous receiver name s for ClientStats (golint)
    • Line 239: warning: exported type ChannelStatsList should have comment or be unexported (golint)
    • Line 241: warning: exported method ChannelStatsList.Len should have comment or be unexported (golint)
    • Line 242: warning: exported method ChannelStatsList.Swap should have comment or be unexported (golint)
    • Line 244: warning: exported type ChannelStatsByHost should have comment or be unexported (golint)
    • Line 248: warning: exported method ChannelStatsByHost.Less should have comment or be unexported (golint)
    • Line 252: warning: exported type ClientStatsList should have comment or be unexported (golint)
    • Line 254: warning: exported method ClientStatsList.Len should have comment or be unexported (golint)
    • Line 255: warning: exported method ClientStatsList.Swap should have comment or be unexported (golint)
    • Line 257: warning: exported type ClientsByHost should have comment or be unexported (golint)
    • Line 261: warning: exported method ClientsByHost.Less should have comment or be unexported (golint)
    • Line 265: warning: exported type TopicStatsList should have comment or be unexported (golint)
    • Line 267: warning: exported method TopicStatsList.Len should have comment or be unexported (golint)
    • Line 268: warning: exported method TopicStatsList.Swap should have comment or be unexported (golint)
    • Line 270: warning: exported type TopicStatsByHost should have comment or be unexported (golint)
    • Line 274: warning: exported method TopicStatsByHost.Less should have comment or be unexported (golint)
    • Line 278: warning: exported type Producers should have comment or be unexported (golint)
    • Line 280: warning: exported method Producers.Len should have comment or be unexported (golint)
    • Line 281: warning: exported method Producers.Swap should have comment or be unexported (golint)
    • Line 283: warning: exported method Producers.HTTPAddrs should have comment or be unexported (golint)
    • Line 291: warning: exported method Producers.Search should have comment or be unexported (golint)
    • Line 300: warning: exported type ProducersByHost should have comment or be unexported (golint)
    • Line 304: warning: exported method ProducersByHost.Less should have comment or be unexported (golint)
    • nsq/nsqd/client_v2.go
    • Line 51: warning: exported type PubCount should have comment or be unexported (golint)
    • Line 56: warning: exported type ClientV2Stats should have comment or be unexported (golint)
    • nsq/internal/writers/spread_writer.go
    • Line 8: warning: exported type SpreadWriter should have comment or be unexported (golint)
    • Line 15: warning: exported function NewSpreadWriter should have comment or be unexported (golint)
    • Line 31: warning: exported method SpreadWriter.Flush should have comment or be unexported (golint)
    • nsq/internal/test/fakes.go
    • Line 8: warning: exported type FakeNetConn should have comment or be unexported (golint)
    • Line 21: warning: exported method FakeNetConn.Close should have comment or be unexported (golint)
    • Line 22: warning: exported method FakeNetConn.LocalAddr should have comment or be unexported (golint)
    • Line 23: warning: exported method FakeNetConn.RemoteAddr should have comment or be unexported (golint)
    • Line 24: warning: exported method FakeNetConn.SetDeadline should have comment or be unexported (golint)
    • Line 25: warning: exported method FakeNetConn.SetReadDeadline should have comment or be unexported (golint)
    • Line 26: warning: exported method FakeNetConn.SetWriteDeadline should have comment or be unexported (golint)
    • Line 33: warning: exported function NewFakeNetConn should have comment or be unexported (golint)
    • nsq/internal/test/logger.go
    • Line 3: warning: exported type Logger should have comment or be unexported (golint)
    • Line 20: warning: exported function NewTestLogger should have comment or be unexported (golint)
    • nsq/nsqd/lookup.go
    • Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • nsq/nsqd/topic.go
    • Line 16: warning: exported type Topic should have comment or be unexported (golint)
    • Line 44: warning: comment on exported function NewTopic should be of the form "NewTopic ..." (golint)
    • Line 90: warning: exported method Topic.Start should have comment or be unexported (golint)
    • Line 136: warning: exported method Topic.GetExistingChannel should have comment or be unexported (golint)
    • Line 240: warning: exported method Topic.Depth should have comment or be unexported (golint)
    • Line 402: warning: exported method Topic.Empty should have comment or be unexported (golint)
    • Line 439: warning: exported method Topic.AggregateChannelE2eProcessingLatency should have comment or be unexported (golint)
    • Line 461: warning: exported method Topic.Pause should have comment or be unexported (golint)
    • Line 465: warning: exported method Topic.UnPause should have comment or be unexported (golint)
    • Line 484: warning: exported method Topic.IsPaused should have comment or be unexported (golint)
    • Line 488: warning: exported method Topic.GenerateID should have comment or be unexported (golint)
    • nsq/nsqd/channel.go
    • Line 20: warning: exported type Consumer should have comment or be unexported (golint)
    • Line 191: warning: exported method Channel.Empty should have comment or be unexported (golint)
    • Line 255: warning: exported method Channel.Depth should have comment or be unexported (golint)
    • Line 259: warning: exported method Channel.Pause should have comment or be unexported (golint)
    • Line 263: warning: exported method Channel.UnPause should have comment or be unexported (golint)
    • Line 286: warning: exported method Channel.IsPaused should have comment or be unexported (golint)
    • Line 320: warning: exported method Channel.PutMessageDeferred should have comment or be unexported (golint)
    • Line 446: warning: exported method Channel.StartInFlightTimeout should have comment or be unexported (golint)
    • Line 459: warning: exported method Channel.StartDeferredTimeout should have comment or be unexported (golint)
    • nsq/nsqd/options.go
    • Line 15: warning: exported type Options should have comment or be unexported (golint)
    • Line 89: warning: exported function NewOptions should have comment or be unexported (golint)
    • nsq/internal/writers/boundary_buffered_writer.go
    • Line 8: warning: exported type BoundaryBufferedWriter should have comment or be unexported (golint)
    • Line 12: warning: exported function NewBoundaryBufferedWriter should have comment or be unexported (golint)
    • Line 28: warning: exported method BoundaryBufferedWriter.Flush should have comment or be unexported (golint)
    • nsq/internal/lg/lg.go
    • Line 1: warning: package comment should be of the form "Package lg ..." (golint)
    • Line 12: warning: exported const DEBUG should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type AppLogFunc should have comment or be unexported (golint)
    • Line 21: warning: exported type Logger should have comment or be unexported (golint)
    • Line 25: warning: exported type NilLogger should have comment or be unexported (golint)
    • Line 27: warning: exported method NilLogger.Output should have comment or be unexported (golint)
    • Line 31: warning: exported type LogLevel should have comment or be unexported (golint)
    • Line 33: warning: exported method LogLevel.Get should have comment or be unexported (golint)
    • Line 35: warning: exported method LogLevel.Set should have comment or be unexported (golint)
    • Line 60: warning: exported function ParseLogLevel should have comment or be unexported (golint)
    • Line 76: warning: exported function Logf should have comment or be unexported (golint)
    • Line 83: warning: exported function LogFatal should have comment or be unexported (golint)
    • nsq/nsqadmin/options.go
    • Line 9: warning: exported type Options should have comment or be unexported (golint)
    • Line 45: warning: exported function NewOptions should have comment or be unexported (golint)
    • nsq/internal/dirlock/dirlock.go
    • Line 11: warning: exported type DirLock should have comment or be unexported (golint)
    • Line 16: warning: exported function New should have comment or be unexported (golint)
    • Line 22: warning: exported method DirLock.Lock should have comment or be unexported (golint)
    • Line 35: warning: exported method DirLock.Unlock should have comment or be unexported (golint)
    • nsq/nsqlookupd/registration_db.go
    • Line 10: warning: exported type RegistrationDB should have comment or be unexported (golint)
    • Line 15: warning: exported type Registration should have comment or be unexported (golint)
    • Line 20: warning: exported type Registrations should have comment or be unexported (golint)
    • Line 22: warning: exported type PeerInfo should have comment or be unexported (golint)
    • Line 33: warning: exported type Producer should have comment or be unexported (golint)
    • Line 39: warning: exported type Producers should have comment or be unexported (golint)
    • Line 40: warning: exported type ProducerMap should have comment or be unexported (golint)
    • Line 46: warning: exported method Producer.Tombstone should have comment or be unexported (golint)
    • Line 51: warning: exported method Producer.IsTombstoned should have comment or be unexported (golint)
    • Line 55: warning: exported function NewRegistrationDB should have comment or be unexported (golint)
    • Line 61: warning: comment on exported method RegistrationDB.AddRegistration should be of the form "AddRegistration ..." (golint)
    • Line 71: warning: comment on exported method RegistrationDB.AddProducer should be of the form "AddProducer ..." (golint)
    • Line 87: warning: comment on exported method RegistrationDB.RemoveProducer should be of the form "RemoveProducer ..." (golint)
    • Line 105: warning: comment on exported method RegistrationDB.RemoveRegistration should be of the form "RemoveRegistration ..." (golint)
    • Line 116: warning: exported method RegistrationDB.FindRegistrations should have comment or be unexported (golint)
    • Line 136: warning: exported method RegistrationDB.FindProducers should have comment or be unexported (golint)
    • Line 161: warning: exported method RegistrationDB.LookupRegistrations should have comment or be unexported (golint)
    • Line 173: warning: exported method Registration.IsMatch should have comment or be unexported (golint)
    • Line 186: warning: exported method Registrations.Filter should have comment or be unexported (golint)
    • Line 196: warning: exported method Registrations.Keys should have comment or be unexported (golint)
    • Line 204: warning: exported method Registrations.SubKeys should have comment or be unexported (golint)
    • Line 212: warning: exported method Producers.FilterByActive should have comment or be unexported (golint)
    • Line 225: warning: exported method Producers.PeerInfo should have comment or be unexported (golint)
    • Line 233: warning: exported function ProducerMap2Slice should have comment or be unexported (golint)
    • nsq/apps/nsq_to_nsq/nsq_to_nsq.go
    • Line 28: warning: exported const ModeRoundRobin should have comment (or a comment on this block) or be unexported (golint)
    • Line 59: warning: exported type PublishHandler should have comment or be unexported (golint)
    • Line 77: warning: exported type TopicHandler should have comment or be unexported (golint)
    • Line 201: warning: exported method TopicHandler.HandleMessage should have comment or be unexported (golint)
    • Line 205: warning: exported method PublishHandler.HandleMessage should have comment or be unexported (golint)
    • nsq/internal/http_api/api_response.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 14: warning: exported type Decorator should have comment or be unexported (golint)
    • Line 16: warning: exported type APIHandler should have comment or be unexported (golint)
    • Line 18: warning: exported type Err should have comment or be unexported (golint)
    • Line 35: warning: exported function PlainText should have comment or be unexported (golint)
    • Line 57: warning: exported function V1 should have comment or be unexported (golint)
    • Line 69: warning: exported function RespondV1 should have comment or be unexported (golint)
    • Line 107: warning: exported function Decorate should have comment or be unexported (golint)
    • Line 117: warning: exported function Log should have comment or be unexported (golint)
    • Line 134: warning: exported function LogPanicHandler should have comment or be unexported (golint)
    • Line 143: warning: exported function LogNotFoundHandler should have comment or be unexported (golint)
    • Line 151: warning: exported function LogMethodNotAllowedHandler should have comment or be unexported (golint)
    • nsq/apps/nsq_to_http/nsq_to_http.go
    • Line 32: warning: exported const ModeAll should have comment (or a comment on this block) or be unexported (golint)
    • Line 68: warning: exported type Publisher should have comment or be unexported (golint)
    • Line 72: warning: exported type PublishHandler should have comment or be unexported (golint)
    • Line 85: warning: exported method PublishHandler.HandleMessage should have comment or be unexported (golint)
    • Line 125: warning: exported type PostPublisher should have comment or be unexported (golint)
    • Line 127: warning: exported method PostPublisher.Publish should have comment or be unexported (golint)
    • Line 142: warning: exported type GetPublisher should have comment or be unexported (golint)
    • Line 144: warning: exported method GetPublisher.Publish should have comment or be unexported (golint)

gocyclo88%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • nsq/nsqd/http.go
    • Line 235: warning: cyclomatic complexity 16 of function (*httpServer).doMPUB() is high (> 15) (gocyclo)
    • nsq/nsqd/protocol_v2.go
    • Line 351: warning: cyclomatic complexity 28 of function (*protocolV2).IDENTIFY() is high (> 15) (gocyclo)
    • Line 205: warning: cyclomatic complexity 27 of function (*protocolV2).messagePump() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!