Preparing report...

Report for github.com/Comcast/webpa-common

A+    Excellent!    Found 162 issues across 451 files

Tweet

gofmt96%

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!


gocyclo99%

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.


golint68%

Golint is a linter for Go source code.

    • webpa-common/device/manager.go
    • Line 23: warning: exported const MaxDevicesHeader should have comment or be unexported (golint)
    • Line 84: warning: exported type Filter should have comment or be unexported (golint)
    • Line 88: warning: exported type MatchResult should have comment or be unexported (golint)
    • Line 93: warning: exported type FilterFunc should have comment or be unexported (golint)
    • Line 95: warning: exported method FilterFunc.AllowConnection should have comment or be unexported (golint)
    • webpa-common/xresolver/consul/consullistener.go
    • Line 17: warning: exported type Options should have comment or be unexported (golint)
    • Line 25: warning: exported type ConsulWatcher should have comment or be unexported (golint)
    • Line 32: warning: exported function NewConsulWatcher should have comment or be unexported (golint)
    • Line 52: warning: exported method ConsulWatcher.MonitorEvent should have comment or be unexported (golint)
    • Line 78: warning: exported method ConsulWatcher.WatchService should have comment or be unexported (golint)
    • Line 94: warning: exported method ConsulWatcher.LookupRoutes should have comment or be unexported (golint)
    • webpa-common/xwebhook/handler.go
    • Line 9: warning: exported function NewAddWebhookHandler should have comment or be unexported (golint)
    • Line 18: warning: exported function NewGetAllWebhooksHandler should have comment or be unexported (golint)
    • webpa-common/xwebhook/store.go
    • Line 7: warning: exported type PushReader should have comment or be unexported (golint)
    • Line 12: warning: exported type Pusher should have comment or be unexported (golint)
    • Line 21: warning: exported type Reader should have comment or be unexported (golint)
    • webpa-common/health/stat.go
    • Line 10: warning: comment on exported const CurrentMemoryUtilizationAlloc should be of the form "CurrentMemoryUtilizationAlloc ..." (golint)
    • Line 12: warning: exported const CurrentMemoryUtilizationHeapSys should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: comment on exported var ErrorInvalidOption should be of the form "ErrorInvalidOption ..." (golint)
    • Line 55: warning: comment on exported method Stat.Set should be of the form "Set ..." (golint)
    • Line 65: warning: exported method HealthFunc.Set should have comment or be unexported (golint)
    • Line 106: warning: exported method Stats.Set should have comment or be unexported (golint)
    • webpa-common/device/devicegate/filter.go
    • Line 69: warning: exported type FilterRequest should have comment or be unexported (golint)
    • Line 74: warning: exported method FilterGate.VisitAll should have comment or be unexported (golint)
    • Line 89: warning: exported method FilterGate.GetFilter should have comment or be unexported (golint)
    • Line 98: warning: exported method FilterGate.SetFilter should have comment or be unexported (golint)
    • Line 121: warning: exported method FilterGate.DeleteFilter should have comment or be unexported (golint)
    • Line 135: warning: exported method FilterGate.AllowConnection should have comment or be unexported (golint)
    • Line 149: warning: exported method FilterGate.GetAllowedFilters should have comment or be unexported (golint)
    • Line 157: warning: exported method FilterSet.Has should have comment or be unexported (golint)
    • Line 167: warning: exported method FilterSet.VisitAll should have comment or be unexported (golint)
    • Line 175: warning: exported method FilterSet.MarshalJSON should have comment or be unexported (golint)
    • webpa-common/secure/key/mocks.go
    • Line 12: warning: exported method MockResolver.ResolveKey should have comment or be unexported (golint)
    • Line 16: 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 26: warning: exported method MockCache.ResolveKey should have comment or be unexported (golint)
    • Line 30: 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 35: warning: exported method MockCache.UpdateKeys should have comment or be unexported (golint)
    • Line 39: 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 49: warning: exported method MockPair.Purpose should have comment or be unexported (golint)
    • Line 54: warning: exported method MockPair.Public should have comment or be unexported (golint)
    • Line 59: warning: exported method MockPair.HasPrivate should have comment or be unexported (golint)
    • Line 64: warning: exported method MockPair.Private should have comment or be unexported (golint)
    • Line 69: warning: exported type MockParser should have comment or be unexported (golint)
    • Line 73: warning: exported method MockParser.ParseKey should have comment or be unexported (golint)
    • webpa-common/webhook/start.go
    • Line 18: warning: exported type StartConfig should have comment or be unexported (golint)
    • Line 49: warning: exported type Result should have comment or be unexported (golint)
    • Line 59: warning: exported function NewStartFactory should have comment or be unexported (golint)
    • Line 118: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 123: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 150: warning: exported method StartConfig.GetCurrentSystemsHooks should have comment or be unexported (golint)
    • webpa-common/secure/validator_test.go
    • Line 35: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 36: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 508: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 509: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 569: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 570: warning: should not use basic type string as key in context.WithValue (golint)
    • webpa-common/httppool/client.go
    • Line 16: warning: exported const DefaultWorkers should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported var ErrorClosed should have comment or be unexported (golint)
    • webpa-common/secure/tools/cmd/keyserver/keyStore.go
    • Line 23: warning: exported method KeyStore.Len should have comment or be unexported (golint)
    • Line 27: warning: exported method KeyStore.KeyIDs should have comment or be unexported (golint)
    • Line 31: warning: exported method KeyStore.PrivateKey should have comment or be unexported (golint)
    • Line 36: warning: exported method KeyStore.PublicKey should have comment or be unexported (golint)
    • webpa-common/resource/loader.go
    • Line 67: warning: exported method HTTP.Location should have comment or be unexported (golint)
    • Line 71: warning: exported method HTTP.Open should have comment or be unexported (golint)
    • Line 130: warning: exported method File.Location should have comment or be unexported (golint)
    • Line 134: warning: exported method File.Open should have comment or be unexported (golint)
    • Line 154: warning: exported method Data.Location should have comment or be unexported (golint)
    • Line 158: warning: exported method Data.Open should have comment or be unexported (golint)
    • webpa-common/secure/tools/cmd/keyserver/configuration.go
    • Line 13: warning: exported const DefaultIssuer should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported var ErrorNoKeys should have comment or be unexported (golint)
    • Line 47: warning: exported method Configuration.Validate should have comment or be unexported (golint)
    • Line 77: warning: exported function ParseConfiguration should have comment or be unexported (golint)
    • webpa-common/service/monitor/listener.go
    • Line 47: warning: exported type Listener should have comment or be unexported (golint)
    • Line 51: warning: exported type ListenerFunc should have comment or be unexported (golint)
    • Line 53: warning: exported method ListenerFunc.MonitorEvent should have comment or be unexported (golint)
    • Line 57: warning: exported type Listeners should have comment or be unexported (golint)
    • Line 59: warning: exported method Listeners.MonitorEvent should have comment or be unexported (golint)
    • Line 120: warning: exported function NewKeyAccessorListener should have comment or be unexported (golint)
    • webpa-common/webhook/aws/signature_validation.go
    • Line 98: warning: exported type Validator should have comment or be unexported (golint)
    • Line 102: warning: exported type SNSValidator should have comment or be unexported (golint)
    • Line 106: warning: exported function NewValidator should have comment or be unexported (golint)
    • Line 117: warning: exported function NewSNSValidator should have comment or be unexported (golint)
    • Line 121: warning: comment on exported method Validator.Validate should be of the form "Validate ..." (golint)
    • webpa-common/secure/key/parser.go
    • Line 11: warning: exported var ErrorPEMRequired should have comment or be unexported (golint)
    • Line 87: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • webpa-common/device/mocks.go
    • Line 10: warning: exported type MockConnector should have comment or be unexported (golint)
    • Line 16: warning: exported method MockConnector.Connect should have comment or be unexported (golint)
    • Line 22: warning: exported method MockConnector.Disconnect should have comment or be unexported (golint)
    • Line 26: warning: exported method MockConnector.DisconnectIf should have comment or be unexported (golint)
    • Line 30: warning: exported method MockConnector.DisconnectAll should have comment or be unexported (golint)
    • Line 34: warning: exported method MockConnector.GetFilter should have comment or be unexported (golint)
    • Line 38: warning: exported type MockRegistry should have comment or be unexported (golint)
    • Line 44: warning: exported method MockRegistry.Len should have comment or be unexported (golint)
    • Line 48: warning: exported method MockRegistry.Get should have comment or be unexported (golint)
    • Line 54: warning: exported method MockRegistry.VisitAll should have comment or be unexported (golint)
    • Line 58: warning: exported type MockDevice should have comment or be unexported (golint)
    • Line 66: warning: exported method MockDevice.MarshalJSON should have comment or be unexported (golint)
    • Line 71: warning: exported method MockDevice.ID should have comment or be unexported (golint)
    • Line 75: warning: exported method MockDevice.Pending should have comment or be unexported (golint)
    • Line 79: warning: exported method MockDevice.Close should have comment or be unexported (golint)
    • Line 83: warning: exported method MockDevice.Closed should have comment or be unexported (golint)
    • Line 88: warning: exported method MockDevice.Statistics should have comment or be unexported (golint)
    • Line 94: warning: exported method MockDevice.Convey should have comment or be unexported (golint)
    • Line 100: warning: exported method MockDevice.ConveyCompliance should have comment or be unexported (golint)
    • Line 106: warning: exported method MockDevice.Metadata should have comment or be unexported (golint)
    • Line 112: warning: exported method MockDevice.CloseReason should have comment or be unexported (golint)
    • Line 118: warning: exported method MockDevice.Send should have comment or be unexported (golint)
    • webpa-common/webhook/aws/sns.go
    • Line 28: warning: exported type AWSConfig should have comment or be unexported (golint)
    • Line 35: warning: exported type SNSConfig should have comment or be unexported (golint)
    • Line 43: warning: exported type SNSServer should have comment or be unexported (golint)
    • Line 85: warning: don't use underscores in Go names; var aws_err should be awsErr (golint)
    • Line 184: warning: comment on exported method SNSServer.PrepareAndStart should be of the form "PrepareAndStart ..." (golint)
    • Line 266: warning: comment on exported method SNSServer.ValidateSubscriptionArn should be of the form "ValidateSubscriptionArn ..." (golint)
    • webpa-common/webhook/handler.go
    • Line 10: warning: exported type Registry should have comment or be unexported (golint)
    • Line 15: warning: exported function NewRegistry should have comment or be unexported (golint)
    • Line 29: warning: comment on exported method Registry.GetRegistry should be of the form "GetRegistry ..." (golint)
    • Line 44: warning: comment on exported method Registry.UpdateRegistry should be of the form "UpdateRegistry ..." (golint)
    • webpa-common/webhook/aws/metrics.go
    • Line 12: warning: exported const DnsReadyQueryCount should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type AWSMetrics should have comment or be unexported (golint)
    • Line 31: warning: exported function ProvideMetrics should have comment or be unexported (golint)
    • webpa-common/hash/serviceHash.go
    • Line 10: warning: error var ServiceHashHolderUninitialized should have name of the form ErrFoo (golint)
    • Line 10: warning: exported var ServiceHashHolderUninitialized should have comment or be unexported (golint)
    • Line 34: warning: exported method ServiceHashHolder.Get should have comment or be unexported (golint)
    • webpa-common/xresolver/types.go
    • Line 15: warning: exported type Lookup should have comment or be unexported (golint)
    • Line 20: warning: exported type Dial should have comment or be unexported (golint)
    • Line 25: warning: exported type ConnCreation should have comment or be unexported (golint)
    • Line 40: warning: exported type Route should have comment or be unexported (golint)
    • Line 91: warning: exported function CreateRoute should have comment or be unexported (golint)
    • Line 128: warning: exported type RoundRobin should have comment or be unexported (golint)
    • Line 133: warning: exported function NewRoundRobinBalancer should have comment or be unexported (golint)
    • Line 139: warning: exported method RoundRobin.Add should have comment or be unexported (golint)
    • Line 158: warning: exported method RoundRobin.Remove should have comment or be unexported (golint)
    • Line 189: warning: exported method RoundRobin.Update should have comment or be unexported (golint)
    • Line 208: warning: exported method RoundRobin.Get should have comment or be unexported (golint)
    • webpa-common/capacitor/capacitortest/mock.go
    • Line 8: warning: exported type Mock should have comment or be unexported (golint)
    • Line 14: warning: exported method Mock.Submit should have comment or be unexported (golint)
    • Line 18: warning: exported method Mock.OnSubmit should have comment or be unexported (golint)
    • Line 22: warning: exported method Mock.Discharge should have comment or be unexported (golint)
    • Line 26: warning: exported method Mock.OnDischarge should have comment or be unexported (golint)
    • Line 30: warning: exported method Mock.Cancel should have comment or be unexported (golint)
    • Line 34: warning: exported method Mock.OnCancel should have comment or be unexported (golint)
    • webpa-common/clock/clocktest/mocks.go
    • Line 18: warning: exported method Mock.Now should have comment or be unexported (golint)
    • Line 22: warning: exported method Mock.OnNow should have comment or be unexported (golint)
    • Line 26: warning: exported method Mock.Sleep should have comment or be unexported (golint)
    • Line 30: warning: exported method Mock.OnSleep should have comment or be unexported (golint)
    • Line 34: warning: exported method Mock.NewTimer should have comment or be unexported (golint)
    • Line 38: warning: exported method Mock.OnNewTimer should have comment or be unexported (golint)
    • Line 42: warning: exported method Mock.NewTicker should have comment or be unexported (golint)
    • Line 46: warning: exported method Mock.OnNewTicker should have comment or be unexported (golint)
    • Line 57: warning: exported method MockTimer.C should have comment or be unexported (golint)
    • Line 61: warning: exported method MockTimer.OnC should have comment or be unexported (golint)
    • Line 65: warning: exported method MockTimer.Reset should have comment or be unexported (golint)
    • Line 69: warning: exported method MockTimer.OnReset should have comment or be unexported (golint)
    • Line 73: warning: exported method MockTimer.Stop should have comment or be unexported (golint)
    • Line 77: warning: exported method MockTimer.OnStop should have comment or be unexported (golint)
    • Line 81: warning: exported type MockTicker should have comment or be unexported (golint)
    • Line 87: warning: exported method MockTicker.C should have comment or be unexported (golint)
    • Line 91: warning: exported method MockTicker.OnC should have comment or be unexported (golint)
    • Line 95: warning: exported method MockTicker.Stop should have comment or be unexported (golint)
    • Line 99: warning: exported method MockTicker.OnStop should have comment or be unexported (golint)
    • webpa-common/convey/context.go
    • Line 7: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 11: warning: exported function FromContext should have comment or be unexported (golint)
    • webpa-common/store/cache.go
    • Line 11: warning: error var NegativeCachePeriod should have name of the form ErrFoo (golint)
    • Line 11: warning: exported var NegativeCachePeriod should have comment or be unexported (golint)
    • Line 61: 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)
    • webpa-common/service/instancers.go
    • Line 7: warning: exported type ContextualInstancer should have comment or be unexported (golint)
    • Line 12: warning: exported method ContextualInstancer.Metadata should have comment or be unexported (golint)
    • Line 32: warning: exported method Instancers.Len should have comment or be unexported (golint)
    • Line 36: warning: exported method Instancers.Has should have comment or be unexported (golint)
    • Line 41: warning: exported method Instancers.Get should have comment or be unexported (golint)
    • Line 46: warning: exported method Instancers.Set should have comment or be unexported (golint)
    • Line 54: warning: exported method Instancers.Copy should have comment or be unexported (golint)
    • Line 67: warning: exported method Instancers.Stop should have comment or be unexported (golint)
    • webpa-common/webhook/aws/sns_handler.go
    • Line 20: warning: exported const MSG_ATTR should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: comment on exported type MsgAttr should be of the form "MsgAttr ..." (with optional leading article) (golint)
    • Line 76: warning: exported type SNSMessage should have comment or be unexported (golint)
    • Line 92: warning: comment on exported method SNSServer.SetSNSRoutes should be of the form "SetSNSRoutes ..." (golint)
    • Line 159: warning: comment on exported method SNSServer.SubscribeConfirmHandle should be of the form "SubscribeConfirmHandle ..." (golint)
    • Line 172: warning: don't use underscores in Go names; var v_err should be vErr (golint)
    • Line 222: warning: comment on exported method SNSServer.NotificationHandle should be of the form "NotificationHandle ..." (golint)
    • Line 245: warning: don't use underscores in Go names; var v_err should be vErr (golint)
    • Line 286: warning: comment on exported method SNSServer.PublishMessage should be of the form "PublishMessage ..." (golint)
    • Line 356: warning: exported method SNSServer.UnsubscribeOldSubscriptions should have comment or be unexported (golint)
    • Line 370: warning: exported method SNSServer.ListSubscriptionsByMatchingEndpoint should have comment or be unexported (golint)
    • webpa-common/bookkeeping/requestResponse.go
    • Line 11: warning: exported function Code should have comment or be unexported (golint)
    • Line 15: warning: exported function RequestBody should have comment or be unexported (golint)
    • Line 33: warning: exported function ResponseBody should have comment or be unexported (golint)
    • Line 42: warning: exported function RequestHeaders should have comment or be unexported (golint)
    • Line 49: warning: exported function ResponseHeaders should have comment or be unexported (golint)
    • Line 86: warning: exported function RequestHeadersWithPrefix should have comment or be unexported (golint)
    • Line 96: warning: exported function ResponseHeadersWithPrefix should have comment or be unexported (golint)
    • webpa-common/webhook/factory.go
    • Line 13: warning: exported const DEFAULT_UNDERTAKER_INTERVAL should have comment (or a comment on this block) or be unexported (golint)
    • Line 74: warning: exported method Factory.SetList should have comment or be unexported (golint)
    • Line 79: warning: exported method Factory.Prune should have comment or be unexported (golint)
    • webpa-common/xhttp/fanout/requestResponse_test.go
    • Line 25: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 57: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 101: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 143: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 275: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 293: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 323: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 404: warning: should not use basic type string as key in context.WithValue (golint)
    • webpa-common/webhook/metrics.go
    • Line 12: warning: exported const ListSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type WebhookMetrics should have comment or be unexported (golint)
    • Line 23: warning: exported function ProvideMetrics should have comment or be unexported (golint)
    • webpa-common/webhook/aws/sns_test_support.go
    • Line 8: warning: exported type ErrResp should have comment or be unexported (golint)
    • Line 14: warning: exported const TEST_AWS_CONFIG should have comment (or a comment on this block) or be unexported (golint)
    • Line 84: warning: exported function SetUpTestNotifier should have comment or be unexported (golint)
    • webpa-common/clock/ticker.go
    • Line 5: warning: exported type Ticker should have comment or be unexported (golint)
    • Line 18: warning: exported function WrapTicker should have comment or be unexported (golint)
    • webpa-common/xhttp/fanout/endpoints.go
    • Line 24: warning: exported type EndpointsFunc should have comment or be unexported (golint)
    • Line 26: warning: exported method EndpointsFunc.FanoutURLs should have comment or be unexported (golint)
    • Line 64: warning: exported method FixedEndpoints.FanoutURLs should have comment or be unexported (golint)
    • webpa-common/convey/error.go
    • Line 3: warning: exported type Compliance should have comment or be unexported (golint)
    • Line 6: warning: exported const Full should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type Comply should have comment or be unexported (golint)
    • Line 48: warning: exported type Error should have comment or be unexported (golint)
    • Line 57: warning: exported method Error.Compliance should have comment or be unexported (golint)
    • webpa-common/secure/validator.go
    • Line 17: warning: exported var ErrorNoProtectedHeader should have comment or be unexported (golint)
    • Line 34: warning: exported method ValidatorFunc.Validate should have comment or be unexported (golint)
    • Line 43: warning: exported method Validators.Validate should have comment or be unexported (golint)
    • Line 57: warning: exported method ExactMatchValidator.Validate should have comment or be unexported (golint)
    • Line 77: warning: don't use underscores in Go names; func result valid_capabilities should be validCapabilities (golint)
    • Line 84: warning: don't use underscores in Go names; var method_value should be methodValue (golint)
    • Line 94: warning: exported method JWSValidator.Validate should have comment or be unexported (golint)
    • webpa-common/server/viper.go
    • Line 69: warning: comment on exported const CPUProfileShorthand should be of the form "CPUProfileShorthand ..." (golint)
    • Line 75: warning: comment on exported const MemProfileShorthand should be of the form "MemProfileShorthand ..." (golint)
    • Line 89: warning: comment on exported function CreateCPUProfileFile should be of the form "CreateCPUProfileFile ..." (golint)
    • Line 115: warning: comment on exported function CreateMemoryProfileFile should be of the form "CreateMemoryProfileFile ..." (golint)
    • webpa-common/concurrent/keyValue.go
    • Line 21: warning: exported method KeyValueOperationFunc.Execute should have comment or be unexported (golint)
    • Line 36: warning: exported method KeyValueTransformerFunc.Execute should have comment or be unexported (golint)
    • webpa-common/tracing/spanned.go
    • Line 87: warning: exported method NopMergeable.Spans should have comment or be unexported (golint)
    • Line 91: warning: exported method NopMergeable.WithSpans should have comment or be unexported (golint)
    • webpa-common/basculemetrics/metricListener.go
    • Line 11: warning: exported type MetricListener should have comment or be unexported (golint)
    • Line 17: warning: exported method MetricListener.OnAuthenticated should have comment or be unexported (golint)
    • Line 54: warning: exported method MetricListener.OnErrorResponse should have comment or be unexported (golint)
    • Line 61: warning: exported type Option should have comment or be unexported (golint)
    • Line 63: warning: exported function WithExpLeeway should have comment or be unexported (golint)
    • Line 69: warning: exported function WithNbfLeeway should have comment or be unexported (golint)
    • Line 75: warning: exported function NewMetricListener should have comment or be unexported (golint)
    • webpa-common/service/accessor.go
    • Line 25: warning: exported method AccessorFunc.Get should have comment or be unexported (golint)
    • Line 44: warning: exported method MapAccessor.Get should have comment or be unexported (golint)
    • Line 47: 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 110: warning: exported type RouteTraffic should have comment or be unexported (golint)
    • Line 121: warning: exported function DefaultTrafficRouter should have comment or be unexported (golint)
    • Line 125: warning: exported type AccessorQueue should have comment or be unexported (golint)
    • Line 133: warning: exported function DefaultOrder should have comment or be unexported (golint)
    • Line 141: warning: exported type AccessorValue should have comment or be unexported (golint)
    • Line 145: warning: exported type LayeredAccessor should have comment or be unexported (golint)
    • Line 166: warning: exported function NewLayeredAccesor should have comment or be unexported (golint)
    • Line 305: warning: exported type ErrorChain should have comment or be unexported (golint)
    • Line 320: warning: exported method ErrorChain.Empty should have comment or be unexported (golint)
    • Line 324: warning: exported type RouteError should have comment or be unexported (golint)
    • webpa-common/device/drain/drainer.go
    • Line 20: warning: exported var ErrActive should have comment or be unexported (golint)
    • Line 25: warning: exported const StateNotActive should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported type Option should have comment or be unexported (golint)
    • Line 40: warning: exported function WithLogger should have comment or be unexported (golint)
    • Line 50: warning: exported function WithRegistry should have comment or be unexported (golint)
    • Line 60: warning: exported function WithConnector should have comment or be unexported (golint)
    • Line 70: warning: exported function WithManager should have comment or be unexported (golint)
    • Line 81: warning: exported function WithStateGauge should have comment or be unexported (golint)
    • Line 91: warning: exported function WithDrainCounter should have comment or be unexported (golint)
    • Line 107: warning: exported type Job should have comment or be unexported (golint)
    • Line 270: warning: receiver name df should be consistent with previous receiver name d for drainFilter (golint)
    • webpa-common/service/registrars.go
    • Line 11: warning: exported method Registrars.Register should have comment or be unexported (golint)
    • Line 17: warning: exported method Registrars.Deregister should have comment or be unexported (golint)
    • Line 23: warning: exported method Registrars.Has should have comment or be unexported (golint)
    • Line 28: warning: exported method Registrars.Len should have comment or be unexported (golint)
    • Line 32: warning: exported method Registrars.Add should have comment or be unexported (golint)
    • webpa-common/secure/jws.go
    • Line 23: 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)
    • webpa-common/secure/token.go
    • Line 14: warning: exported const AuthorizationHeader should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported method Token.Value should have comment or be unexported (golint)
    • Line 64: warning: exported method Token.Trust should have comment or be unexported (golint)
    • Line 68: warning: exported method Token.Bytes should have comment or be unexported (golint)
    • webpa-common/xhttp/error.go
    • Line 17: warning: exported method Error.StatusCode should have comment or be unexported (golint)
    • Line 21: warning: exported method Error.Headers should have comment or be unexported (golint)
    • Line 29: warning: exported method Error.MarshalJSON should have comment or be unexported (golint)
    • webpa-common/server/webpa.go
    • Line 31: warning: exported const DefaultBuild should have comment (or a comment on this block) or be unexported (golint)
    • Line 61: warning: exported function RestartableFunc should have comment or be unexported (golint)
    • Line 156: warning: exported type PeerVerifyCallback should have comment or be unexported (golint)
    • Line 158: warning: exported function DefaultPeerVerifyCallback should have comment or be unexported (golint)
    • Line 212: warning: exported method Basic.SetPeerVerifyCallback should have comment or be unexported (golint)
    • Line 334: warning: exported method Metric.NewRegistry should have comment or be unexported (golint)
    • Line 340: warning: exported method Metric.New should have comment or be unexported (golint)
    • webpa-common/webhook/aws/signature_validation_test.go
    • Line 95: warning: don't use underscores in Go names; var signature_b should be signatureB (golint)
    • Line 151: warning: don't use underscores in Go names; var snsMsg_noti should be snsMsgNoti (golint)
    • Line 151: warning: don't use underscores in Go names; var snsMsg_conf should be snsMsgConf (golint)
    • Line 161: warning: don't use underscores in Go names; var snsMsgGood_noti should be snsMsgGoodNoti (golint)
    • Line 162: warning: don't use underscores in Go names; var snsMsgBad_noti should be snsMsgBadNoti (golint)
    • Line 165: warning: don't use underscores in Go names; var snsMsgGood_conf should be snsMsgGoodConf (golint)
    • Line 166: warning: don't use underscores in Go names; var snsMsgBad_conf should be snsMsgBadConf (golint)
    • Line 268: warning: don't use underscores in Go names; var snsMsg_noti should be snsMsgNoti (golint)
    • Line 268: warning: don't use underscores in Go names; var snsMsg_conf should be snsMsgConf (golint)
    • webpa-common/xmetrics/registry.go
    • Line 79: 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 118: 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 157: 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 210: 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)
    • webpa-common/service/consul/options.go
    • Line 10: warning: exported const DefaultDatacenterRetries should have comment or be unexported (golint)
    • Line 12: warning: exported type Watch should have comment or be unexported (golint)
    • Line 20: warning: exported type Options should have comment or be unexported (golint)
    • webpa-common/webhook/webhook.go
    • Line 12: warning: exported const DEFAULT_EXPIRATION_DURATION should have comment (or a comment on this block) or be unexported (golint)
    • Line 65: warning: exported function NewW should have comment or be unexported (golint)
    • webpa-common/service/mocks.go
    • Line 16: warning: exported method MockAccessor.Get should have comment or be unexported (golint)
    • Line 28: warning: exported method MockRegistrar.Register should have comment or be unexported (golint)
    • Line 32: warning: exported method MockRegistrar.Deregister should have comment or be unexported (golint)
    • Line 43: warning: exported method MockInstancer.Register should have comment or be unexported (golint)
    • Line 47: warning: exported method MockInstancer.Deregister should have comment or be unexported (golint)
    • Line 51: warning: exported method MockInstancer.Stop should have comment or be unexported (golint)
    • Line 62: warning: exported method MockEnvironment.Register should have comment or be unexported (golint)
    • Line 66: warning: exported method MockEnvironment.Deregister should have comment or be unexported (golint)
    • Line 70: warning: exported method MockEnvironment.Close should have comment or be unexported (golint)
    • Line 74: warning: exported method MockEnvironment.IsRegistered should have comment or be unexported (golint)
    • Line 78: warning: exported method MockEnvironment.DefaultScheme should have comment or be unexported (golint)
    • Line 82: warning: exported method MockEnvironment.Instancers should have comment or be unexported (golint)
    • Line 86: warning: exported method MockEnvironment.UpdateInstancers should have comment or be unexported (golint)
    • Line 90: warning: exported method MockEnvironment.AccessorFactory should have comment or be unexported (golint)
    • Line 94: warning: exported method MockEnvironment.Closed should have comment or be unexported (golint)
    • Line 98: warning: exported method MockEnvironment.Provider should have comment or be unexported (golint)
    • webpa-common/device/statistics.go
    • Line 164: 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)
    • webpa-common/service/zk/options.go
    • Line 9: warning: exported const DefaultServer should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Registration should have comment or be unexported (golint)
    • webpa-common/secure/tools/cmd/keyserver/issueHandler.go
    • Line 19: warning: exported const KeyIDVariableName should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported var ErrorMissingKeyID should have comment or be unexported (golint)
    • Line 60: warning: exported method NumericDate.UnmarshalText should have comment or be unexported (golint)
    • Line 111: warning: exported method SigningMethod.UnmarshalText should have comment or be unexported (golint)
    • Line 143: warning: exported method IssueRequest.SigningMethod should have comment or be unexported (golint)
    • Line 209: warning: exported function NewIssueRequest should have comment or be unexported (golint)
    • webpa-common/store/value.go
    • Line 20: warning: exported method ValueFunc.Load should have comment or be unexported (golint)
    • Line 45: 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)
    • webpa-common/webhook/aws/mock_sns.go
    • Line 9: warning: exported type MockSVC should have comment or be unexported (golint)
    • Line 14: warning: exported type MockValidator should have comment or be unexported (golint)
    • Line 18: warning: exported method MockSVC.Subscribe should have comment or be unexported (golint)
    • Line 23: warning: exported method MockSVC.ConfirmSubscription should have comment or be unexported (golint)
    • Line 28: warning: exported method MockSVC.Publish should have comment or be unexported (golint)
    • Line 33: warning: exported method MockSVC.Unsubscribe should have comment or be unexported (golint)
    • Line 38: warning: exported method MockSVC.ListSubscriptionsByTopic should have comment or be unexported (golint)
    • Line 43: warning: exported method MockValidator.Validate should have comment or be unexported (golint)
    • webpa-common/secure/handler/authorizationHandler.go
    • Line 16: warning: comment on exported const JsonContentType should be of the form "JsonContentType ..." (golint)
    • Line 19: warning: comment on exported const ContentTypeHeader should be of the form "ContentTypeHeader ..." (golint)
    • Line 22: warning: comment on exported const ContentTypeOptionsHeader should be of the form "ContentTypeOptionsHeader ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words