Preparing report...

Report for github.com/karimra/gnmic

A    Great!    Found 135 issues across 163 files

Tweet

gofmt98%

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!


gocyclo73%

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.

    • gnmic/app/gnmi_server.go
    • Line 886: warning: cyclomatic complexity 30 of function targetConfigToNotification() is high (> 15) (gocyclo)
    • Line 262: warning: cyclomatic complexity 25 of function (*App).Get() is high (> 15) (gocyclo)
    • Line 594: warning: cyclomatic complexity 18 of function (*App).handleStreamSubscriptionRequest() is high (> 15) (gocyclo)
    • Line 380: warning: cyclomatic complexity 18 of function (*App).Set() is high (> 15) (gocyclo)
    • Line 115: warning: cyclomatic complexity 16 of function (*App).registerGNMIServer() is high (> 15) (gocyclo)
    • gnmic/app/app.go
    • Line 311: warning: cyclomatic complexity 22 of function (*App).loadTargets() is high (> 15) (gocyclo)
    • gnmic/config/set.go
    • Line 92: warning: cyclomatic complexity 19 of function (*Config).CreateSetRequestFromFile() is high (> 15) (gocyclo)
    • gnmic/app/path.go
    • Line 206: warning: cyclomatic complexity 27 of function (*App).generateTypeInfo() is high (> 15) (gocyclo)
    • Line 27: warning: cyclomatic complexity 20 of function (*App).PathCmdRun() is high (> 15) (gocyclo)
    • gnmic/app/subscribe.go
    • Line 27: warning: cyclomatic complexity 18 of function (*App).SubscribeRun() is high (> 15) (gocyclo)
    • Line 125: warning: cyclomatic complexity 18 of function (*App).SubscribeRunPrompt() is high (> 15) (gocyclo)
    • gnmic/formatters/event.go
    • Line 229: warning: cyclomatic complexity 23 of function EventFromMap() is high (> 15) (gocyclo)
    • Line 139: warning: cyclomatic complexity 22 of function getValueFlat() is high (> 15) (gocyclo)
    • Line 23: warning: cyclomatic complexity 21 of function ResponseToEventMsgs() is high (> 15) (gocyclo)
    • gnmic/cmd/listen.go
    • Line 165: warning: cyclomatic complexity 24 of function (*dialoutTelemetryServer).Publish() is high (> 15) (gocyclo)
    • Line 42: warning: cyclomatic complexity 19 of function newListenCmd() is high (> 15) (gocyclo)
    • gnmic/collector/collector.go
    • Line 553: warning: cyclomatic complexity 27 of function (*Collector).Start() is high (> 15) (gocyclo)
    • Line 243: warning: cyclomatic complexity 20 of function (*Collector).TargetSubscribeStream() is high (> 15) (gocyclo)
    • gnmic/config/targets.go
    • Line 18: warning: cyclomatic complexity 32 of function (*Config).GetTargets() is high (> 15) (gocyclo)
    • Line 151: warning: cyclomatic complexity 23 of function (*Config).SetTargetConfigDefaults() is high (> 15) (gocyclo)
    • gnmic/cmd/prompt.go
    • Line 530: warning: cyclomatic complexity 39 of function findDynamicSuggestions() is high (> 15) (gocyclo)
    • Line 328: warning: cyclomatic complexity 28 of function findMatchedXPATH() is high (> 15) (gocyclo)
    • gnmic/config/config.go
    • Line 549: warning: cyclomatic complexity 32 of function (*Config).CreateSetRequest() is high (> 15) (gocyclo)
    • Line 700: warning: cyclomatic complexity 20 of function setValue() is high (> 15) (gocyclo)
    • Line 868: warning: cyclomatic complexity 16 of function (*Config).ValidateSetInput() is high (> 15) (gocyclo)
    • gnmic/app/diff.go
    • Line 113: warning: cyclomatic complexity 25 of function (*App).subscribeBasedDiff() is high (> 15) (gocyclo)

golint20%

Golint is a linter for Go source code.

    • gnmic/formatters/event_add_tag/event_add_tag.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 48: warning: exported method AddTag.Init should have comment or be unexported (golint)
    • Line 115: warning: exported method AddTag.Apply should have comment or be unexported (golint)
    • Line 166: warning: exported method AddTag.WithLogger should have comment or be unexported (golint)
    • Line 174: warning: exported method AddTag.WithTargets should have comment or be unexported (golint)
    • gnmic/inputs/stan_input/stan_input.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 76: warning: exported method StanInput.Start should have comment or be unexported (golint)
    • Line 125: warning: exported method StanInput.Close should have comment or be unexported (golint)
    • Line 131: warning: exported method StanInput.SetLogger should have comment or be unexported (golint)
    • Line 138: warning: exported method StanInput.SetOutputs should have comment or be unexported (golint)
    • Line 152: warning: exported method StanInput.SetName should have comment or be unexported (golint)
    • Line 163: warning: exported method StanInput.SetEventProcessors should have comment or be unexported (golint)
    • gnmic/config/inputs.go
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 10: warning: exported method Config.GetInputs should have comment or be unexported (golint)
    • gnmic/types/target.go
    • Line 86: warning: exported method TargetConfig.UsernameString should have comment or be unexported (golint)
    • Line 93: warning: exported method TargetConfig.PasswordString should have comment or be unexported (golint)
    • Line 100: warning: exported method TargetConfig.InsecureString should have comment or be unexported (golint)
    • Line 107: warning: exported method TargetConfig.TLSCAString should have comment or be unexported (golint)
    • Line 114: warning: exported method TargetConfig.TLSKeyString should have comment or be unexported (golint)
    • Line 121: warning: exported method TargetConfig.TLSCertString should have comment or be unexported (golint)
    • Line 128: warning: exported method TargetConfig.SkipVerifyString should have comment or be unexported (golint)
    • Line 135: warning: exported method TargetConfig.SubscriptionString should have comment or be unexported (golint)
    • Line 139: warning: exported method TargetConfig.OutputsString should have comment or be unexported (golint)
    • Line 143: warning: exported method TargetConfig.BufferSizeString should have comment or be unexported (golint)
    • gnmic/inputs/nats_input/nats_input.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 73: warning: comment on exported method NatsInput.Start should be of the form "Start ..." (golint)
    • Line 221: warning: exported method NatsInput.SetName should have comment or be unexported (golint)
    • Line 232: warning: exported method NatsInput.SetEventProcessors should have comment or be unexported (golint)
    • gnmic/outputs/options.go
    • Line 10: warning: exported type Option should have comment or be unexported (golint)
    • Line 12: warning: exported function WithLogger should have comment or be unexported (golint)
    • Line 18: warning: exported function WithEventProcessors should have comment or be unexported (golint)
    • Line 24: warning: exported function WithRegister should have comment or be unexported (golint)
    • Line 30: warning: exported function WithName should have comment or be unexported (golint)
    • Line 36: warning: exported function WithClusterName should have comment or be unexported (golint)
    • Line 42: warning: exported function WithTargetsConfig should have comment or be unexported (golint)
    • gnmic/outputs/nats_output/natsOutput.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 92: warning: exported method NatsOutput.SetLogger should have comment or be unexported (golint)
    • Line 99: warning: exported method NatsOutput.SetEventProcessors should have comment or be unexported (golint)
    • Line 224: warning: exported method NatsOutput.WriteEvent should have comment or be unexported (golint)
    • Line 234: warning: comment on exported method NatsOutput.RegisterMetrics should be of the form "RegisterMetrics ..." (golint)
    • Line 377: warning: exported method NatsOutput.SetName should have comment or be unexported (golint)
    • Line 388: warning: exported method NatsOutput.SetClusterName should have comment or be unexported (golint)
    • Line 390: warning: exported method NatsOutput.SetTargetsConfig should have comment or be unexported (golint)
    • gnmic/utils/tls.go
    • Line 17: warning: exported function NewTLSConfig should have comment or be unexported (golint)
    • Line 53: warning: exported function SelfSignedCerts should have comment or be unexported (golint)
    • gnmic/inputs/input.go
    • Line 11: warning: exported type Input should have comment or be unexported (golint)
    • Line 20: warning: exported type Initializer should have comment or be unexported (golint)
    • Line 22: warning: exported var InputTypes should have comment or be unexported (golint)
    • Line 28: warning: exported var Inputs should have comment or be unexported (golint)
    • Line 30: warning: exported function Register 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 WithLogger should have comment or be unexported (golint)
    • Line 42: warning: exported function WithOutputs should have comment or be unexported (golint)
    • Line 48: warning: exported function WithName should have comment or be unexported (golint)
    • Line 54: warning: exported function WithEventProcessors should have comment or be unexported (golint)
    • gnmic/utils/utils.go
    • Line 11: warning: exported function MergeMaps should have comment or be unexported (golint)
    • Line 37: warning: exported function PathElems should have comment or be unexported (golint)
    • Line 43: warning: exported function GnmiPathToXPath should have comment or be unexported (golint)
    • Line 72: warning: exported function GetHost should have comment or be unexported (golint)
    • gnmic/config/loader.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 11: warning: exported method Config.GetLoader should have comment or be unexported (golint)
    • gnmic/formatters/formats.go
    • Line 16: warning: exported type MarshalOptions should have comment or be unexported (golint)
    • Line 87: warning: exported method MarshalOptions.OverrideTimestamp should have comment or be unexported (golint)
    • gnmic/formatters/processors.go
    • Line 13: warning: exported var EventProcessors should have comment or be unexported (golint)
    • Line 15: warning: exported var EventProcessorTypes should have comment or be unexported (golint)
    • Line 33: warning: exported type Initializer should have comment or be unexported (golint)
    • Line 35: warning: exported function Register should have comment or be unexported (golint)
    • Line 39: warning: exported type Option should have comment or be unexported (golint)
    • Line 40: warning: exported type EventProcessor should have comment or be unexported (golint)
    • Line 48: warning: exported function DecodeConfig should have comment or be unexported (golint)
    • Line 61: warning: exported function WithLogger should have comment or be unexported (golint)
    • Line 67: warning: exported function WithTargets should have comment or be unexported (golint)
    • Line 73: warning: exported function CheckCondition should have comment or be unexported (golint)
    • gnmic/loaders/loaders.go
    • Line 12: warning: exported type TargetLoader should have comment or be unexported (golint)
    • Line 18: warning: exported type Initializer should have comment or be unexported (golint)
    • Line 20: warning: exported var Loaders should have comment or be unexported (golint)
    • Line 22: warning: exported var LoadersTypes should have comment or be unexported (golint)
    • Line 29: warning: exported function Register should have comment or be unexported (golint)
    • Line 33: warning: exported type TargetOperation should have comment or be unexported (golint)
    • Line 38: warning: exported function DecodeConfig should have comment or be unexported (golint)
    • Line 51: warning: exported function Diff should have comment or be unexported (golint)
    • gnmic/types/subscription.go
    • Line 150: warning: exported method SubscriptionConfig.PathsString should have comment or be unexported (golint)
    • Line 154: warning: exported method SubscriptionConfig.PrefixString should have comment or be unexported (golint)
    • Line 161: warning: exported method SubscriptionConfig.ModeString should have comment or be unexported (golint)
    • Line 168: warning: exported method SubscriptionConfig.SampleIntervalString should have comment or be unexported (golint)
    • Line 175: warning: exported method SubscriptionConfig.ModelsString should have comment or be unexported (golint)
    • Line 179: warning: exported method SubscriptionConfig.QosString should have comment or be unexported (golint)
    • Line 186: warning: exported method SubscriptionConfig.HeartbeatIntervalString should have comment or be unexported (golint)
    • Line 190: warning: exported method SubscriptionConfig.SuppressRedundantString should have comment or be unexported (golint)
    • Line 194: warning: exported method SubscriptionConfig.UpdatesOnlyString should have comment or be unexported (golint)
    • gnmic/collector/outputs.go
    • Line 28: warning: exported method Collector.InitOutput should have comment or be unexported (golint)
    • Line 58: warning: exported method Collector.InitOutputs should have comment or be unexported (golint)
    • Line 64: warning: exported method Collector.DeleteOutput should have comment or be unexported (golint)
    • gnmic/loaders/option.go
    • Line 7: warning: exported type Option should have comment or be unexported (golint)
    • Line 9: warning: exported function WithRegistry should have comment or be unexported (golint)
    • gnmic/config/config.go
    • Line 39: warning: exported type Config should have comment or be unexported (golint)
    • Line 57: warning: exported var ValueTypes should have comment or be unexported (golint)
    • Line 59: warning: exported type GlobalFlags should have comment or be unexported (golint)
    • Line 99: warning: exported type LocalFlags should have comment or be unexported (golint)
    • Line 207: warning: exported function New should have comment or be unexported (golint)
    • Line 226: warning: exported method Config.Load should have comment or be unexported (golint)
    • Line 257: warning: exported method Config.SetLogger should have comment or be unexported (golint)
    • Line 278: warning: exported method Config.SetPersistantFlagsFromFile should have comment or be unexported (golint)
    • Line 290: warning: exported method Config.SetLocalFlagsFromFile should have comment or be unexported (golint)
    • Line 338: warning: exported method Config.CreateGetRequest should have comment or be unexported (golint)
    • Line 381: warning: exported method Config.CreateGASGetRequest should have comment or be unexported (golint)
    • Line 423: warning: exported method Config.CreateGASSetRequest should have comment or be unexported (golint)
    • Line 549: warning: exported method Config.CreateSetRequest should have comment or be unexported (golint)
    • Line 868: warning: exported method Config.ValidateSetInput should have comment or be unexported (golint)
    • Line 916: warning: exported method Config.LogOutput should have comment or be unexported (golint)
    • Line 920: warning: exported method Config.LogFlags should have comment or be unexported (golint)
    • Line 924: warning: exported function ExpandOSPaths should have comment or be unexported (golint)
    • gnmic/formatters/event_write/event_write.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 22: warning: exported type Write should have comment or be unexported (golint)
    • Line 51: warning: exported method Write.Init should have comment or be unexported (golint)
    • Line 129: warning: exported method Write.Apply should have comment or be unexported (golint)
    • Line 199: warning: exported method Write.WithLogger should have comment or be unexported (golint)
    • Line 225: warning: exported method Write.WithTargets should have comment or be unexported (golint)
    • gnmic/lockers/consul_locker/consul_registration.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 15: warning: exported method ConsulLocker.Register should have comment or be unexported (golint)
    • Line 59: warning: exported method ConsulLocker.Deregister should have comment or be unexported (golint)
    • Line 68: warning: exported method ConsulLocker.WatchServices should have comment or be unexported (golint)
    • Line 139: warning: exported method ConsulLocker.IsLocked should have comment or be unexported (golint)
    • Line 151: warning: exported method ConsulLocker.List should have comment or be unexported (golint)
    • gnmic/config/api_server.go
    • Line 13: warning: exported type APIServer should have comment or be unexported (golint)
    • Line 26: warning: exported method Config.GetAPIServer should have comment or be unexported (golint)
    • gnmic/outputs/influxdb_output/influxdb_output.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 45: warning: exported type InfluxDBOutput should have comment or be unexported (golint)
    • Line 59: warning: exported type Config should have comment or be unexported (golint)
    • Line 85: warning: exported method InfluxDBOutput.SetLogger should have comment or be unexported (golint)
    • Line 85: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 92: warning: exported method InfluxDBOutput.SetEventProcessors should have comment or be unexported (golint)
    • Line 92: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 118: warning: exported method InfluxDBOutput.Init should have comment or be unexported (golint)
    • Line 118: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 185: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 216: warning: exported method InfluxDBOutput.WriteEvent should have comment or be unexported (golint)
    • Line 216: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 218: warning: exported method InfluxDBOutput.Close should have comment or be unexported (golint)
    • Line 218: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 224: warning: exported method InfluxDBOutput.RegisterMetrics should have comment or be unexported (golint)
    • Line 224: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 226: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 238: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 275: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 315: warning: exported method InfluxDBOutput.SetName should have comment or be unexported (golint)
    • Line 315: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 316: warning: exported method InfluxDBOutput.SetClusterName should have comment or be unexported (golint)
    • Line 316: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 317: warning: exported method InfluxDBOutput.SetTargetsConfig should have comment or be unexported (golint)
    • Line 317: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • Line 319: warning: receiver name i should be consistent with previous receiver name k for InfluxDBOutput (golint)
    • gnmic/outputs/kafka_output/kafka_scram_client.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 11: warning: exported var SHA256 should have comment or be unexported (golint)
    • Line 12: warning: exported var SHA512 should have comment or be unexported (golint)
    • Line 14: warning: exported type XDGSCRAMClient should have comment or be unexported (golint)
    • Line 20: warning: exported method XDGSCRAMClient.Begin should have comment or be unexported (golint)
    • Line 29: warning: exported method XDGSCRAMClient.Step should have comment or be unexported (golint)
    • Line 34: warning: exported method XDGSCRAMClient.Done should have comment or be unexported (golint)
    • gnmic/app/generate.go
    • Line 20: warning: exported method App.GenerateRunE should have comment or be unexported (golint)
    • Line 73: warning: exported method App.GeneratePreRunE should have comment or be unexported (golint)
    • Line 118: warning: exported method App.GenerateSetRequestRunE should have comment or be unexported (golint)
    • Line 171: warning: exported method App.InitGenerateFlags should have comment or be unexported (golint)
    • Line 185: warning: exported method App.InitGenerateSetRequestFlags should have comment or be unexported (golint)
    • Line 195: warning: exported method App.GenerateYangSchema should have comment or be unexported (golint)
    • gnmic/app/gnmi_server.go
    • Line 253: warning: exported method App.Update should have comment or be unexported (golint)
    • Line 262: warning: exported method App.Get should have comment or be unexported (golint)
    • Line 380: warning: exported method App.Set should have comment or be unexported (golint)
    • Line 479: warning: exported method App.Subscribe should have comment or be unexported (golint)
    • gnmic/lockers/locker.go
    • Line 13: warning: exported var ErrCanceled should have comment or be unexported (golint)
    • Line 16: warning: exported type Locker should have comment or be unexported (golint)
    • Line 34: warning: exported type Initializer should have comment or be unexported (golint)
    • Line 36: warning: exported var Lockers should have comment 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 46: warning: exported var LockerTypes should have comment or be unexported (golint)
    • Line 50: warning: exported function Register should have comment or be unexported (golint)
    • Line 54: warning: exported function DecodeConfig should have comment or be unexported (golint)
    • Line 67: warning: exported type ServiceRegistration should have comment or be unexported (golint)
    • Line 76: warning: exported type Service should have comment or be unexported (golint)
    • gnmic/target/target.go
    • Line 21: warning: exported type TargetError should have comment or be unexported (golint)
    • Line 164: warning: exported method Target.Stop should have comment or be unexported (golint)
    • gnmic/outputs/stan_output/stan_output.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 98: warning: exported method StanOutput.SetLogger should have comment or be unexported (golint)
    • Line 105: warning: exported method StanOutput.SetEventProcessors should have comment or be unexported (golint)
    • Line 241: warning: exported method StanOutput.WriteEvent should have comment or be unexported (golint)
    • Line 243: warning: comment on exported method StanOutput.RegisterMetrics should be of the form "RegisterMetrics ..." (golint)
    • Line 372: warning: exported method StanOutput.SetName should have comment or be unexported (golint)
    • Line 383: warning: exported method StanOutput.SetClusterName should have comment or be unexported (golint)
    • Line 384: warning: exported method StanOutput.SetTargetsConfig should have comment or be unexported (golint)
    • gnmic/formatters/event_merge/event_merge.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 34: warning: exported method Merge.Init should have comment or be unexported (golint)
    • Line 54: warning: exported method Merge.Apply should have comment or be unexported (golint)
    • Line 85: warning: exported method Merge.WithLogger should have comment or be unexported (golint)
    • Line 93: warning: exported method Merge.WithTargets should have comment or be unexported (golint)
    • gnmic/outputs/output.go
    • Line 10: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 19: warning: exported type Output should have comment or be unexported (golint)
    • Line 34: warning: exported type Initializer should have comment or be unexported (golint)
    • Line 36: warning: exported var Outputs should have comment or be unexported (golint)
    • Line 38: warning: exported var OutputTypes should have comment or be unexported (golint)
    • Line 50: warning: exported function Register should have comment or be unexported (golint)
    • Line 54: warning: exported type Meta should have comment or be unexported (golint)
    • Line 56: warning: exported function DecodeConfig should have comment or be unexported (golint)
    • Line 69: warning: exported function AddSubscriptionTarget should have comment or be unexported (golint)
    • Line 104: warning: exported var DefaultTargetTemplate should have comment or be unexported (golint)
    • Line 110: warning: exported var TemplateFuncs should have comment or be unexported (golint)
    • gnmic/formatters/event_drop/event_drop.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 46: warning: exported method Drop.Init should have comment or be unexported (golint)
    • Line 109: warning: exported method Drop.Apply should have comment or be unexported (golint)
    • Line 163: warning: exported method Drop.WithLogger should have comment or be unexported (golint)
    • Line 171: warning: exported method Drop.WithTargets should have comment or be unexported (golint)
    • gnmic/outputs/udp_output/udp_output.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 34: warning: exported type UDPSock should have comment or be unexported (golint)
    • Line 48: warning: exported type Config should have comment or be unexported (golint)
    • Line 61: warning: exported method UDPSock.SetLogger should have comment or be unexported (golint)
    • Line 68: warning: exported method UDPSock.SetEventProcessors should have comment or be unexported (golint)
    • Line 94: warning: exported method UDPSock.Init should have comment or be unexported (golint)
    • Line 159: warning: exported method UDPSock.WriteEvent should have comment or be unexported (golint)
    • Line 161: warning: exported method UDPSock.Close should have comment or be unexported (golint)
    • Line 169: warning: exported method UDPSock.RegisterMetrics should have comment or be unexported (golint)
    • Line 218: warning: exported method UDPSock.SetName should have comment or be unexported (golint)
    • Line 219: warning: exported method UDPSock.SetClusterName should have comment or be unexported (golint)
    • Line 220: warning: exported method UDPSock.SetTargetsConfig should have comment or be unexported (golint)
    • gnmic/app/set.go
    • Line 14: warning: exported method App.SetRun should have comment or be unexported (golint)
    • Line 59: warning: exported method App.SetRequest should have comment or be unexported (golint)
    • gnmic/formatters/event_delete/event_delete.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 19: warning: comment on exported type Delete should be of the form "Delete ..." (with optional leading article) (golint)
    • Line 44: warning: exported method Delete.Init should have comment or be unexported (golint)
    • Line 99: warning: exported method Delete.Apply should have comment or be unexported (golint)
    • Line 138: warning: exported method Delete.WithLogger should have comment or be unexported (golint)
    • Line 146: warning: exported method Delete.WithTargets should have comment or be unexported (golint)
    • gnmic/formatters/event_strings/event_strings.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 70: warning: exported method Strings.Init should have comment or be unexported (golint)
    • Line 130: warning: exported method Strings.Apply should have comment or be unexported (golint)
    • Line 169: warning: exported method Strings.WithLogger should have comment or be unexported (golint)
    • Line 177: warning: exported method Strings.WithTargets should have comment or be unexported (golint)
    • gnmic/outputs/stan_output/stan_metrics.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 5: warning: exported var StanNumberOfSentMsgs should have comment or be unexported (golint)
    • Line 12: warning: exported var StanNumberOfSentBytes should have comment or be unexported (golint)
    • Line 19: warning: exported var StanNumberOfFailSendMsgs should have comment or be unexported (golint)
    • Line 26: warning: exported var StanSendDuration should have comment or be unexported (golint)
    • gnmic/config/subscriptions.go
    • Line 16: warning: exported method Config.GetSubscriptions should have comment or be unexported (golint)
    • Line 132: warning: exported method Config.GetSubscriptionsFromFile should have comment or be unexported (golint)
    • gnmic/formatters/event_convert/event_convert.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 41: warning: exported method Convert.Init should have comment or be unexported (golint)
    • Line 68: warning: exported method Convert.Apply should have comment or be unexported (golint)
    • Line 119: warning: exported method Convert.WithLogger should have comment or be unexported (golint)
    • Line 127: warning: exported method Convert.WithTargets should have comment or be unexported (golint)
    • gnmic/config/diff.go
    • Line 14: warning: exported method Config.CreateDiffSubscribeRequest should have comment or be unexported (golint)
    • Line 30: warning: exported method Config.CreateDiffGetRequest should have comment or be unexported (golint)
    • gnmic/formatters/event.go
    • Line 202: warning: exported method EventMsg.ToMap should have comment or be unexported (golint)
    • Line 229: warning: exported function EventFromMap should have comment or be unexported (golint)
    • gnmic/lockers/consul_locker/consul_locker.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 38: warning: exported type ConsulLocker should have comment or be unexported (golint)
    • Line 66: warning: exported method ConsulLocker.Init should have comment or be unexported (golint)
    • Line 98: warning: exported method ConsulLocker.Lock should have comment or be unexported (golint)
    • Line 155: warning: exported method ConsulLocker.KeepLock should have comment or be unexported (golint)
    • Line 183: warning: exported method ConsulLocker.Unlock should have comment or be unexported (golint)
    • Line 212: warning: exported method ConsulLocker.Stop should have comment or be unexported (golint)
    • Line 223: warning: exported method ConsulLocker.SetLogger should have comment or be unexported (golint)
    • gnmic/outputs/tcp_output/tcp_output.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 35: warning: exported type TCPOutput should have comment or be unexported (golint)
    • Line 48: warning: exported type Config should have comment or be unexported (golint)
    • Line 63: warning: exported method TCPOutput.SetLogger should have comment or be unexported (golint)
    • Line 70: warning: exported method TCPOutput.SetEventProcessors should have comment or be unexported (golint)
    • Line 96: warning: exported method TCPOutput.Init should have comment or be unexported (golint)
    • Line 167: warning: exported method TCPOutput.WriteEvent should have comment or be unexported (golint)
    • Line 169: warning: exported method TCPOutput.Close should have comment or be unexported (golint)
    • Line 176: warning: exported method TCPOutput.RegisterMetrics should have comment or be unexported (golint)
    • Line 226: warning: exported method TCPOutput.SetName should have comment or be unexported (golint)
    • Line 227: warning: exported method TCPOutput.SetClusterName should have comment or be unexported (golint)
    • Line 228: warning: exported method TCPOutput.SetTargetsConfig should have comment or be unexported (golint)
    • Line 228: warning: receiver name s should be consistent with previous receiver name t for TCPOutput (golint)
    • gnmic/outputs/kafka_output/kafka_output.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 108: warning: exported method KafkaOutput.SetLogger should have comment or be unexported (golint)
    • Line 115: warning: exported method KafkaOutput.SetEventProcessors should have comment or be unexported (golint)
    • Line 259: warning: exported method KafkaOutput.WriteEvent should have comment or be unexported (golint)
    • Line 268: warning: comment on exported method KafkaOutput.RegisterMetrics should be of the form "RegisterMetrics ..." (golint)
    • Line 343: warning: exported method KafkaOutput.SetName should have comment or be unexported (golint)
    • Line 354: warning: exported method KafkaOutput.SetClusterName should have comment or be unexported (golint)
    • Line 356: warning: exported method KafkaOutput.SetTargetsConfig should have comment or be unexported (golint)
    • gnmic/app/prompt.go
    • Line 15: warning: exported method App.PromptRunE should have comment or be unexported (golint)
    • Line 49: warning: comment on exported method App.PromptPreRunE should be of the form "PromptPreRunE ..." (golint)
    • Line 73: warning: exported method App.InitPromptFlags should have comment or be unexported (golint)
    • gnmic/testutils/utils.go
    • Line 8: warning: exported function CompareGetRequests should have comment or be unexported (golint)
    • Line 44: warning: exported function CompareSetRequests should have comment or be unexported (golint)
    • Line 87: warning: exported function GnmiPathsEqual should have comment or be unexported (golint)
    • gnmic/config/targets.go
    • Line 16: warning: exported var ErrNoTargetsFound should have comment or be unexported (golint)
    • Line 18: warning: exported method Config.GetTargets should have comment or be unexported (golint)
    • Line 151: warning: exported method Config.SetTargetConfigDefaults should have comment or be unexported (golint)
    • Line 221: warning: exported method Config.TargetsList should have comment or be unexported (golint)
    • Line 305: warning: exported method Config.GetDiffTargets should have comment or be unexported (golint)
    • gnmic/config/set.go
    • Line 24: warning: exported type UpdateItem should have comment or be unexported (golint)
    • Line 30: warning: exported type SetRequestFile should have comment or be unexported (golint)
    • Line 36: warning: exported method Config.ReadSetRequestTemplate should have comment or be unexported (golint)
    • Line 92: warning: exported method Config.CreateSetRequestFromFile should have comment or be unexported (golint)
    • gnmic/app/app.go
    • Line 44: warning: exported type App should have comment or be unexported (golint)
    • Line 82: warning: exported function New should have comment or be unexported (golint)
    • Line 112: warning: exported method App.InitGlobalFlags should have comment or be unexported (golint)
    • Line 157: warning: exported method App.PreRun should have comment or be unexported (golint)
    • Line 252: warning: exported method App.PrintMsg should have comment or be unexported (golint)
    • Line 420: warning: exported method App.LoadProtoFiles should have comment or be unexported (golint)
    • gnmic/app/getset.go
    • Line 17: warning: exported method App.GetSetRun should have comment or be unexported (golint)
    • Line 63: warning: exported method App.GetSetRequest should have comment or be unexported (golint)
    • gnmic/app/version.go
    • Line 25: warning: exported method App.VersionRun should have comment or be unexported (golint)
    • Line 51: warning: exported method App.VersionUpgradeRun should have comment or be unexported (golint)
    • gnmic/formatters/event_allow/event_allow.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 46: warning: exported method Allow.Init should have comment or be unexported (golint)
    • Line 109: warning: exported method Allow.Apply should have comment or be unexported (golint)
    • Line 165: warning: exported method Allow.WithLogger should have comment or be unexported (golint)
    • Line 173: warning: exported method Allow.WithTargets should have comment or be unexported (golint)
    • gnmic/target/subscribe.go
    • Line 139: warning: exported method Target.SubscribeOnce should have comment or be unexported (golint)
    • Line 170: warning: exported method Target.ReadSubscriptions should have comment or be unexported (golint)
    • Line 174: warning: exported method Target.NumberOfOnceSubscriptions should have comment or be unexported (golint)
    • Line 184: warning: exported method Target.DecodeProtoBytes should have comment or be unexported (golint)
    • Line 209: warning: exported method Target.DeleteSubscription should have comment or be unexported (golint)
    • gnmic/app/get.go
    • Line 13: warning: exported method App.GetRun should have comment or be unexported (golint)
    • Line 59: warning: exported method App.GetRequest should have comment or be unexported (golint)
    • gnmic/formatters/event_trigger/event_trigger.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 15: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 57: warning: exported method Trigger.Init should have comment or be unexported (golint)
    • Line 98: warning: exported method Trigger.Apply should have comment or be unexported (golint)
    • Line 121: warning: exported method Trigger.WithLogger should have comment or be unexported (golint)
    • Line 129: warning: exported method Trigger.WithTargets should have comment or be unexported (golint)
    • gnmic/outputs/file/file_metrics.go
    • Line 5: warning: exported var NumberOfWrittenBytes should have comment or be unexported (golint)
    • Line 12: warning: exported var NumberOfReceivedMsgs should have comment or be unexported (golint)
    • Line 19: warning: exported var NumberOfWrittenMsgs should have comment or be unexported (golint)
    • Line 26: warning: exported var NumberOfFailWriteMsgs should have comment or be unexported (golint)
    • gnmic/config/outputs.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 12: warning: exported method Config.GetOutputs should have comment or be unexported (golint)
    • Line 99: warning: exported method Config.GetOutputsSuggestions should have comment or be unexported (golint)
    • Line 124: warning: exported method Config.GetOutputsConfigs should have comment or be unexported (golint)
    • gnmic/app/capabilities.go
    • Line 14: warning: exported method App.CapRun should have comment or be unexported (golint)
    • Line 55: warning: exported method App.ReqCapabilities should have comment or be unexported (golint)
    • Line 80: warning: exported method App.InitCapabilitiesFlags should have comment or be unexported (golint)
    • gnmic/actions/action.go
    • Line 11: warning: exported type Action should have comment or be unexported (golint)
    • Line 20: warning: exported type Option should have comment or be unexported (golint)
    • Line 22: warning: exported var Actions should have comment or be unexported (golint)
    • Line 24: warning: exported type Initializer should have comment or be unexported (golint)
    • Line 26: warning: exported function Register should have comment or be unexported (golint)
    • Line 30: warning: exported function DecodeConfig should have comment or be unexported (golint)
    • Line 43: warning: exported function WithTargets should have comment or be unexported (golint)
    • Line 49: warning: exported function WithLogger should have comment or be unexported (golint)
    • Line 55: warning: exported type Input should have comment or be unexported (golint)
    • gnmic/collector/inputs.go
    • Line 11: warning: exported function WithInputs should have comment or be unexported (golint)
    • Line 62: warning: exported method Collector.InitInputs should have comment or be unexported (golint)
    • gnmic/inputs/kafka_input/kafka_input.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 85: warning: exported method KafkaInput.Start should have comment or be unexported (golint)
    • Line 201: warning: exported method KafkaInput.Close should have comment or be unexported (golint)
    • Line 207: warning: exported method KafkaInput.SetLogger should have comment or be unexported (golint)
    • Line 214: warning: exported method KafkaInput.SetOutputs should have comment or be unexported (golint)
    • Line 228: warning: exported method KafkaInput.SetName should have comment or be unexported (golint)
    • Line 239: warning: exported method KafkaInput.SetEventProcessors should have comment or be unexported (golint)
    • gnmic/outputs/kafka_output/kafka_metrics.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 5: warning: exported var KafkaNumberOfSentMsgs should have comment or be unexported (golint)
    • Line 12: warning: exported var KafkaNumberOfSentBytes should have comment or be unexported (golint)
    • Line 19: warning: exported var KafkaNumberOfFailSendMsgs should have comment or be unexported (golint)
    • Line 26: warning: exported var KafkaSendDuration should have comment or be unexported (golint)
    • gnmic/app/generatePath.go
    • Line 11: warning: exported method App.GeneratePathPreRunE should have comment or be unexported (golint)
    • Line 22: warning: exported method App.GeneratePathRunE should have comment or be unexported (golint)
    • Line 39: warning: exported method App.InitGeneratePathFlags should have comment or be unexported (golint)
    • gnmic/formatters/event_override_ts/event_override_ts.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 37: warning: exported method OverrideTS.Init should have comment or be unexported (golint)
    • Line 59: warning: exported method OverrideTS.Apply should have comment or be unexported (golint)
    • Line 80: warning: exported method OverrideTS.WithLogger should have comment or be unexported (golint)
    • Line 88: warning: exported method OverrideTS.WithTargets should have comment or be unexported (golint)
    • gnmic/inputs/kafka_input/kafka_scram_client.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 11: warning: exported var SHA256 should have comment or be unexported (golint)
    • Line 12: warning: exported var SHA512 should have comment or be unexported (golint)
    • Line 14: warning: exported type XDGSCRAMClient should have comment or be unexported (golint)
    • Line 20: warning: exported method XDGSCRAMClient.Begin should have comment or be unexported (golint)
    • Line 29: warning: exported method XDGSCRAMClient.Step should have comment or be unexported (golint)
    • Line 34: warning: exported method XDGSCRAMClient.Done should have comment or be unexported (golint)
    • gnmic/app/subscribe.go
    • Line 27: warning: exported method App.SubscribeRun should have comment or be unexported (golint)
    • Line 125: warning: exported method App.SubscribeRunPrompt should have comment or be unexported (golint)
    • Line 398: warning: exported method App.SubscribeRunONCE should have comment or be unexported (golint)
    • Line 432: warning: exported method App.SubscribeRunPoll should have comment or be unexported (golint)
    • gnmic/outputs/nats_output/nats_metrics.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 5: warning: exported var NatsNumberOfSentMsgs should have comment or be unexported (golint)
    • Line 12: warning: exported var NatsNumberOfSentBytes should have comment or be unexported (golint)
    • Line 19: warning: exported var NatsNumberOfFailSendMsgs should have comment or be unexported (golint)
    • Line 26: warning: exported var NatsSendDuration should have comment or be unexported (golint)
    • gnmic/formatters/event_to_tag/event_to_tag.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 41: warning: exported method ToTag.Init should have comment or be unexported (golint)
    • Line 76: warning: exported method ToTag.Apply should have comment or be unexported (golint)
    • Line 111: warning: exported method ToTag.WithLogger should have comment or be unexported (golint)
    • Line 119: warning: exported method ToTag.WithTargets should have comment or be unexported (golint)
    • gnmic/app/path.go
    • Line 27: warning: exported method App.PathCmdRun should have comment or be unexported (golint)
    • Line 103: warning: exported method App.PathPreRunE should have comment or be unexported (golint)
    • Line 114: warning: exported method App.PathRunE should have comment or be unexported (golint)
    • Line 131: warning: exported method App.InitPathFlags should have comment or be unexported (golint)
    • gnmic/outputs/file/file_output.go
    • Line 75: warning: exported method File.SetEventProcessors should have comment or be unexported (golint)
    • Line 101: warning: exported method File.SetLogger should have comment or be unexported (golint)
    • Line 221: warning: exported method File.WriteEvent should have comment or be unexported (golint)
    • Line 229: warning: comment on exported method File.RegisterMetrics should be of the form "RegisterMetrics ..." (golint)
    • Line 239: warning: exported method File.SetName should have comment or be unexported (golint)
    • Line 240: warning: exported method File.SetClusterName should have comment or be unexported (golint)
    • Line 241: warning: exported method File.SetTargetsConfig should have comment or be unexported (golint)
    • gnmic/collector/collector.go
    • Line 120: warning: exported type CollectorOption should have comment or be unexported (golint)
    • Line 127: warning: exported function WithLogger should have comment or be unexported (golint)
    • Line 137: warning: exported function WithSubscriptions should have comment or be unexported (golint)
    • Line 143: warning: exported function WithOutputs should have comment or be unexported (golint)
    • Line 151: warning: exported function WithDialOptions should have comment or be unexported (golint)
    • Line 157: warning: exported function WithEventProcessors should have comment or be unexported (golint)
    • Line 163: warning: exported function WithProtoDescriptor should have comment or be unexported (golint)
    • Line 169: warning: exported function WithCache should have comment or be unexported (golint)
    • Line 175: warning: exported function WithPrometheusRegistry should have comment or be unexported (golint)
    • Line 231: warning: exported method Collector.CreateTarget should have comment or be unexported (golint)
    • Line 243: warning: exported method Collector.TargetSubscribeStream should have comment or be unexported (golint)
    • Line 324: warning: exported method Collector.TargetSubscribeOnce should have comment or be unexported (golint)
    • Line 341: warning: exported method Collector.TargetSubscribePoll should have comment or be unexported (golint)
    • Line 370: warning: exported method Collector.DeleteTarget should have comment or be unexported (golint)
    • Line 396: warning: exported method Collector.StopTarget should have comment or be unexported (golint)
    • Line 429: warning: exported method Collector.DeleteSubscription should have comment or be unexported (golint)
    • Line 488: warning: exported method Collector.SubscribeOnce should have comment or be unexported (golint)
    • Line 737: warning: exported method Collector.Export should have comment or be unexported (golint)
    • Line 766: warning: exported method Collector.Capabilities should have comment or be unexported (golint)
    • Line 791: warning: exported method Collector.Get should have comment or be unexported (golint)
    • Line 816: warning: exported method Collector.Set should have comment or be unexported (golint)
    • Line 841: warning: exported method Collector.GetModels should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words