Preparing report...

Report for github.com/btccom/go-micro-plugins

A    Great!    Found 170 issues across 303 files

Tweet

gofmt69%

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!


golint61%

Golint is a linter for Go source code.

    • go-micro-plugins/broker/redis/options.go
    • Line 10: warning: exported var DefaultMaxActive should have comment or be unexported (golint)
    • Line 32: warning: exported function ConnectTimeout should have comment or be unexported (golint)
    • Line 39: warning: exported function ReadTimeout should have comment or be unexported (golint)
    • Line 46: warning: exported function WriteTimeout should have comment or be unexported (golint)
    • Line 53: warning: exported function MaxIdle should have comment or be unexported (golint)
    • Line 60: warning: exported function MaxActive should have comment or be unexported (golint)
    • Line 67: warning: exported function IdleTimeout should have comment or be unexported (golint)
    • go-micro-plugins/broker/nsq/options.go
    • Line 18: warning: exported function WithConcurrentHandlers should have comment or be unexported (golint)
    • Line 27: warning: exported function WithMaxInFlight should have comment or be unexported (golint)
    • Line 36: warning: exported function WithAsyncPublish should have comment or be unexported (golint)
    • Line 45: warning: exported function WithDeferredPublish should have comment or be unexported (golint)
    • Line 54: warning: exported function WithLookupdAddrs should have comment or be unexported (golint)
    • Line 60: warning: exported function WithConsumerOpts should have comment or be unexported (golint)
    • go-micro-plugins/codec/segmentio/json.go
    • Line 13: warning: exported type Codec should have comment or be unexported (golint)
    • Line 20: warning: exported method Codec.ReadHeader should have comment or be unexported (golint)
    • Line 24: warning: exported method Codec.ReadBody should have comment or be unexported (golint)
    • Line 41: warning: exported method Codec.Close should have comment or be unexported (golint)
    • Line 49: warning: exported function NewCodec should have comment or be unexported (golint)
    • go-micro-plugins/registry/eureka/mock/fargo_conn.go
    • Line 1: warning: package comment should be of the form "Package mock ..." (golint)
    • Line 10: warning: exported type FargoConnection should have comment or be unexported (golint)
    • Line 73: warning: exported method FargoConnection.RegisterInstance should have comment or be unexported (golint)
    • Line 81: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 86: warning: exported method FargoConnection.RegisterInstanceCallCount should have comment or be unexported (golint)
    • Line 92: warning: exported method FargoConnection.RegisterInstanceArgsForCall should have comment or be unexported (golint)
    • Line 98: warning: exported method FargoConnection.RegisterInstanceReturns should have comment or be unexported (golint)
    • Line 105: warning: exported method FargoConnection.DeregisterInstance should have comment or be unexported (golint)
    • Line 113: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 118: warning: exported method FargoConnection.DeregisterInstanceCallCount should have comment or be unexported (golint)
    • Line 124: warning: exported method FargoConnection.DeregisterInstanceArgsForCall should have comment or be unexported (golint)
    • Line 130: warning: exported method FargoConnection.DeregisterInstanceReturns should have comment or be unexported (golint)
    • Line 137: warning: exported method FargoConnection.HeartBeatInstance should have comment or be unexported (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 150: warning: exported method FargoConnection.HeartBeatInstanceCallCount should have comment or be unexported (golint)
    • Line 156: warning: exported method FargoConnection.HeartBeatInstanceArgsForCall should have comment or be unexported (golint)
    • Line 162: warning: exported method FargoConnection.HeartBeatInstanceReturns should have comment or be unexported (golint)
    • Line 169: warning: exported method FargoConnection.GetInstance should have comment or be unexported (golint)
    • Line 178: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 183: warning: exported method FargoConnection.GetInstanceCallCount should have comment or be unexported (golint)
    • Line 189: warning: exported method FargoConnection.GetInstanceArgsForCall should have comment or be unexported (golint)
    • Line 195: warning: exported method FargoConnection.GetInstanceReturns should have comment or be unexported (golint)
    • Line 203: warning: exported method FargoConnection.GetApp should have comment or be unexported (golint)
    • Line 211: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 216: warning: exported method FargoConnection.GetAppCallCount should have comment or be unexported (golint)
    • Line 222: warning: exported method FargoConnection.GetAppArgsForCall should have comment or be unexported (golint)
    • Line 228: warning: exported method FargoConnection.GetAppReturns should have comment or be unexported (golint)
    • Line 236: warning: exported method FargoConnection.GetApps should have comment or be unexported (golint)
    • Line 242: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 247: warning: exported method FargoConnection.GetAppsCallCount should have comment or be unexported (golint)
    • Line 253: warning: exported method FargoConnection.GetAppsReturns should have comment or be unexported (golint)
    • Line 261: warning: exported method FargoConnection.ScheduleAppUpdates should have comment or be unexported (golint)
    • Line 271: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 276: warning: exported method FargoConnection.ScheduleAppUpdatesCallCount should have comment or be unexported (golint)
    • Line 282: warning: exported method FargoConnection.ScheduleAppUpdatesArgsForCall should have comment or be unexported (golint)
    • Line 288: warning: exported method FargoConnection.ScheduleAppUpdatesReturns should have comment or be unexported (golint)
    • go-micro-plugins/logger/zerolog/options.go
    • Line 9: warning: exported type Options should have comment or be unexported (golint)
    • Line 28: warning: exported function ReportCaller should have comment or be unexported (golint)
    • Line 34: warning: exported function UseAsDefault should have comment or be unexported (golint)
    • Line 40: warning: exported function WithDevelopmentMode should have comment or be unexported (golint)
    • Line 46: warning: exported function WithProductionMode should have comment or be unexported (golint)
    • Line 52: warning: exported function WithTimeFormat should have comment or be unexported (golint)
    • Line 58: warning: exported function WithHooks should have comment or be unexported (golint)
    • Line 64: warning: exported function WithExitFunc should have comment or be unexported (golint)
    • go-micro-plugins/micro/disable_rpc/disable_rpc.go
    • Line 2: warning: don't use an underscore in package name (golint)
    • Line 11: warning: don't use underscores in Go names; type disable_rpc should be disableRPC (golint)
    • Line 17: warning: receiver name r should be consistent with previous receiver name i for disable_rpc (golint)
    • Line 21: warning: receiver name r should be consistent with previous receiver name i for disable_rpc (golint)
    • Line 34: warning: receiver name r should be consistent with previous receiver name i for disable_rpc (golint)
    • Line 38: warning: receiver name r should be consistent with previous receiver name i for disable_rpc (golint)
    • go-micro-plugins/broker/rabbitmq/auth.go
    • Line 3: warning: exported type ExternalAuthentication should have comment or be unexported (golint)
    • Line 6: warning: exported method ExternalAuthentication.Mechanism should have comment or be unexported (golint)
    • Line 10: warning: exported method ExternalAuthentication.Response should have comment or be unexported (golint)
    • go-micro-plugins/proxy/http/http.go
    • Line 36: warning: comment on exported var DefaultBackend should be of the form "DefaultBackend ..." (golint)
    • Line 38: warning: comment on exported var DefaultRouter should be of the form "DefaultRouter ..." (golint)
    • Line 42: warning: comment on exported method Resolver.Resolve should be of the form "Resolve ..." (golint)
    • Line 121: warning: exported method Router.ProcessMessage should have comment or be unexported (golint)
    • Line 185: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • go-micro-plugins/logger/logrus/options.go
    • Line 9: warning: exported type Options should have comment or be unexported (golint)
    • Line 21: warning: exported function WithTextTextFormatter should have comment or be unexported (golint)
    • Line 24: warning: exported function WithJSONFormatter should have comment or be unexported (golint)
    • Line 30: warning: exported function WithLevelHooks should have comment or be unexported (golint)
    • Line 36: warning: comment on exported function ReportCaller should be of the form "ReportCaller ..." (golint)
    • Line 44: warning: exported function WithExitFunc should have comment or be unexported (golint)
    • Line 50: warning: exported function WithLogger should have comment or be unexported (golint)
    • go-micro-plugins/client/mock/mock.go
    • Line 18: warning: exported type MockResponse should have comment or be unexported (golint)
    • Line 24: warning: exported type MockClient should have comment or be unexported (golint)
    • Line 32: warning: exported method MockClient.Init should have comment or be unexported (golint)
    • Line 49: warning: exported method MockClient.Options should have comment or be unexported (golint)
    • Line 53: warning: exported method MockClient.NewMessage should have comment or be unexported (golint)
    • Line 57: warning: exported method MockClient.NewRequest should have comment or be unexported (golint)
    • Line 61: warning: exported method MockClient.Call should have comment or be unexported (golint)
    • Line 115: warning: exported method MockClient.Stream should have comment or be unexported (golint)
    • Line 123: warning: exported method MockClient.Publish should have comment or be unexported (golint)
    • Line 131: warning: exported function NewClient should have comment or be unexported (golint)
    • go-micro-plugins/broker/snssqs/options.go
    • Line 41: warning: exported function ClientValidateOnPublish should have comment or be unexported (golint)
    • Line 80: warning: comment on exported function HeaderWhitelistOnPublish should be of the form "HeaderWhitelistOnPublish ..." (golint)
    • Line 85: warning: comment on exported function ClientHeaderWhitelistOnPublish should be of the form "ClientHeaderWhitelistOnPublish ..." (golint)
    • go-micro-plugins/logger/zap/options.go
    • Line 10: warning: exported type Options should have comment or be unexported (golint)
    • Line 16: warning: exported function WithCallerSkip should have comment or be unexported (golint)
    • Line 36: warning: exported function WithNamespace should have comment or be unexported (golint)
    • go-micro-plugins/wrapper/monitoring/prometheus/prometheus.go
    • Line 16: warning: comment on exported var DefaultMetricPrefix should be of the form "DefaultMetricPrefix ..." (golint)
    • Line 18: warning: comment on exported var DefaultLabelPrefix should be of the form "DefaultLabelPrefix ..." (golint)
    • Line 28: warning: exported type Options should have comment or be unexported (golint)
    • Line 34: warning: exported type Option should have comment or be unexported (golint)
    • Line 36: warning: exported function ServiceName should have comment or be unexported (golint)
    • Line 42: warning: exported function ServiceVersion should have comment or be unexported (golint)
    • Line 48: warning: exported function ServiceID should have comment or be unexported (golint)
    • Line 121: warning: exported function NewClientWrapper should have comment or be unexported (golint)
    • Line 139: warning: exported function NewCallWrapper should have comment or be unexported (golint)
    • Line 238: warning: exported function NewHandlerWrapper should have comment or be unexported (golint)
    • Line 275: warning: exported function NewSubscriberWrapper should have comment or be unexported (golint)
    • go-micro-plugins/registry/nats/options.go
    • Line 16: warning: exported var DefaultQuorum should have comment or be unexported (golint)
    • Line 27: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 32: warning: exported function Quorum should have comment or be unexported (golint)
    • go-micro-plugins/broker/kafka/options.go
    • Line 12: warning: exported var DefaultBrokerConfig should have comment or be unexported (golint)
    • Line 19: warning: exported function BrokerConfig should have comment or be unexported (golint)
    • Line 23: warning: exported function ClusterConfig should have comment or be unexported (golint)
    • Line 36: warning: exported function SubscribeConfig should have comment or be unexported (golint)
    • go-micro-plugins/codec/segmentio/marshaler.go
    • Line 19: warning: exported type Marshaler should have comment or be unexported (golint)
    • Line 21: warning: exported method Marshaler.Marshal should have comment or be unexported (golint)
    • Line 35: warning: exported method Marshaler.Unmarshal should have comment or be unexported (golint)
    • go-micro-plugins/broker/nsq/nsq.go
    • Line 50: warning: exported var DefaultConcurrentHandlers should have comment or be unexported (golint)
    • Line 220: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 332: warning: exported function NewBroker should have comment or be unexported (golint)
    • go-micro-plugins/broker/segmentio/segmentio.go
    • Line 1: warning: package comment should be of the form "Package segmentio ..." (golint)
    • Line 433: warning: receiver name sub should be consistent with previous receiver name s for subscriber (golint)
    • Line 464: warning: exported function NewBroker should have comment or be unexported (golint)
    • go-micro-plugins/logger/zerolog/zerolog.go
    • Line 17: warning: exported type Mode should have comment or be unexported (golint)
    • Line 20: warning: exported const Production should have comment (or a comment on this block) or be unexported (golint)
    • Line 197: warning: exported function ZerologToLoggerLevel should have comment or be unexported (golint)
    • go-micro-plugins/wrapper/monitoring/victoriametrics/victoriametrics.go
    • Line 16: warning: comment on exported var DefaultMetricPrefix should be of the form "DefaultMetricPrefix ..." (golint)
    • Line 18: warning: comment on exported var DefaultLabelPrefix should be of the form "DefaultLabelPrefix ..." (golint)
    • Line 22: warning: exported type Options should have comment or be unexported (golint)
    • Line 28: warning: exported type Option should have comment or be unexported (golint)
    • Line 30: warning: exported function ServiceName should have comment or be unexported (golint)
    • Line 36: warning: exported function ServiceVersion should have comment or be unexported (golint)
    • Line 42: warning: exported function ServiceID should have comment or be unexported (golint)
    • Line 77: warning: exported function NewClientWrapper should have comment or be unexported (golint)
    • Line 90: warning: exported function NewCallWrapper should have comment or be unexported (golint)
    • Line 191: warning: exported function NewHandlerWrapper should have comment or be unexported (golint)
    • Line 225: warning: exported function NewSubscriberWrapper should have comment or be unexported (golint)
    • go-micro-plugins/registry/consul/options.go
    • Line 17: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 21: warning: exported function Config should have comment or be unexported (golint)
    • Line 26: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 43: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 60: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 79: warning: should not use basic type string as key in context.WithValue (golint)
    • go-micro-plugins/codec/json-iterator/json.go
    • Line 12: warning: exported type Codec should have comment or be unexported (golint)
    • Line 21: warning: exported method Codec.ReadHeader should have comment or be unexported (golint)
    • Line 25: warning: exported method Codec.ReadBody should have comment or be unexported (golint)
    • Line 42: warning: exported method Codec.Close should have comment or be unexported (golint)
    • Line 50: warning: exported function NewCodec should have comment or be unexported (golint)
    • go-micro-plugins/micro/stats_auth/stats_auth.go
    • Line 1: warning: package comment should be of the form "Package stats_auth ..." (golint)
    • Line 2: warning: don't use an underscore in package name (golint)
    • Line 15: warning: don't use underscores in Go names; type stats_auth should be statsAuth (golint)
    • Line 80: warning: exported function NewPlugin should have comment or be unexported (golint)
    • go-micro-plugins/registry/gossip/gossip.go
    • Line 132: warning: comment on exported var DefaultSecret should be of the form "DefaultSecret ..." (golint)
    • Line 134: warning: exported var ExpiryTick should have comment or be unexported (golint)
    • Line 442: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 831: warning: exported function NewRegistry should have comment or be unexported (golint)
    • go-micro-plugins/broker/segmentio/options.go
    • Line 11: warning: exported var DefaultReaderConfig should have comment or be unexported (golint)
    • Line 18: warning: exported function ReaderConfig should have comment or be unexported (golint)
    • Line 22: warning: exported function WriterConfig should have comment or be unexported (golint)
    • Line 35: warning: exported function SubscribeReaderConfig should have comment or be unexported (golint)
    • Line 41: warning: exported function SubscribeWriterConfig should have comment or be unexported (golint)
    • go-micro-plugins/codec/msgpackrpc/rpc.go
    • Line 22: warning: exported var ErrBadPackSize should have comment or be unexported (golint)
    • Line 94: warning: exported method Request.DecodeMsg should have comment or be unexported (golint)
    • Line 154: warning: exported type Response should have comment or be unexported (golint)
    • Line 162: warning: exported method Response.EncodeMsg should have comment or be unexported (golint)
    • Line 206: warning: exported method Response.DecodeMsg should have comment or be unexported (golint)
    • Line 283: warning: exported type Notification should have comment or be unexported (golint)
    • Line 330: warning: exported method Notification.DecodeMsg should have comment or be unexported (golint)
    • go-micro-plugins/micro/router/router.go
    • Line 20: warning: exported type Option should have comment or be unexported (golint)
    • Line 31: warning: comment on exported var DefaultFile should be of the form "DefaultFile ..." (golint)
    • Line 33: warning: exported var DefaultPath should have comment or be unexported (golint)
    • Line 181: warning: exported function NewRouter should have comment or be unexported (golint)

gocyclo93%

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.


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!