Preparing report...

Report for github.com/ant-libs-go/kafka

A+    Excellent!    Found 8 issues across 9 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo100%

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.

No problems detected. Good job!


golint33%

Golint is a linter for Go source code.

    • kafka/depend_mgr/depend_mgr.go
    • Line 8: warning: don't use an underscore in package name (golint)
    • Line 23: warning: exported const DEPEND_KEY should have comment or be unexported (golint)
    • Line 25: warning: exported type DependMgr should have comment or be unexported (golint)
    • Line 33: warning: exported function New should have comment or be unexported (golint)
    • Line 41: warning: exported method DependMgr.Start should have comment or be unexported (golint)
    • Line 41: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 52: warning: exported method DependMgr.Stop should have comment or be unexported (golint)
    • Line 52: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 59: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 80: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 108: warning: exported method DependMgr.MarkTopicOffset should have comment or be unexported (golint)
    • Line 108: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 121: warning: exported method DependMgr.GetFrontTopicOffset should have comment or be unexported (golint)
    • Line 121: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 142: warning: exported method DependMgr.Wait should have comment or be unexported (golint)
    • Line 142: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • kafka/producer/partitioner.go
    • Line 19: warning: exported type Partitioner should have comment or be unexported (golint)
    • Line 24: warning: exported type PartitionerConstructor should have comment or be unexported (golint)
    • Line 28: warning: exported function NewManualPartitioner should have comment or be unexported (golint)
    • Line 32: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 41: warning: exported function NewRandomPartitioner should have comment or be unexported (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 56: warning: exported function NewRoundRobinPartitioner should have comment or be unexported (golint)
    • Line 60: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 75: warning: exported function NewHashPartitioner should have comment or be unexported (golint)
    • Line 83: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • kafka/producer/producer.go
    • Line 21: warning: exported type KafkaProducer should have comment or be unexported (golint)
    • Line 31: warning: exported var DefaultSucFeedbackFn should have comment or be unexported (golint)
    • Line 39: warning: exported function NewKafkaProducer should have comment or be unexported (golint)
    • Line 86: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 100: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 117: warning: exported method KafkaProducer.Publish should have comment or be unexported (golint)
    • Line 117: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 130: warning: exported method KafkaProducer.SetSucFeedback should have comment or be unexported (golint)
    • Line 130: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 134: warning: exported method KafkaProducer.SetFailFeedback should have comment or be unexported (golint)
    • Line 134: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 138: warning: exported method KafkaProducer.Close should have comment or be unexported (golint)
    • Line 138: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • kafka/producer/producer_mgr.go
    • Line 35: warning: exported type Cfg should have comment or be unexported (golint)
    • Line 45: warning: exported function DefaultProducerPublish should have comment or be unexported (golint)
    • Line 49: warning: exported function CloseDefaultProducer should have comment or be unexported (golint)
    • Line 53: warning: exported function Publish should have comment or be unexported (golint)
    • Line 62: warning: exported function SetSucFeedback should have comment or be unexported (golint)
    • Line 71: warning: exported function SetFailFeedback should have comment or be unexported (golint)
    • Line 80: warning: exported function Producer should have comment or be unexported (golint)
    • Line 88: warning: exported function SafeProducer should have comment or be unexported (golint)
    • Line 92: warning: exported function CloseProducer should have comment or be unexported (golint)
    • kafka/consumer/consumer.go
    • Line 21: warning: exported var DefaultReceiveFn should have comment or be unexported (golint)
    • Line 26: warning: exported var DefaultReceiveSelector should have comment or be unexported (golint)
    • Line 36: warning: exported type KafkaConsumer should have comment or be unexported (golint)
    • Line 43: warning: exported function NewKafkaConsumer should have comment or be unexported (golint)
    • Line 81: warning: exported method KafkaConsumer.SetReceiveSelector should have comment or be unexported (golint)
    • Line 81: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 85: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 102: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 123: warning: exported method KafkaConsumer.Receive should have comment or be unexported (golint)
    • Line 123: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 136: warning: exported method KafkaConsumer.Close should have comment or be unexported (golint)
    • Line 136: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • kafka/consumer/consumer_mgr.go
    • Line 34: warning: exported type Cfg should have comment or be unexported (golint)
    • Line 42: warning: exported function DefaultConsumerReceive should have comment or be unexported (golint)
    • Line 46: warning: exported function CloseDefaultConsumer should have comment or be unexported (golint)
    • Line 50: warning: exported function Receive should have comment or be unexported (golint)
    • Line 59: warning: exported function Consumer should have comment or be unexported (golint)
    • Line 67: warning: exported function SafeConsumer should have comment or be unexported (golint)
    • Line 71: warning: exported function CloseConsumer should have comment or be unexported (golint)
    • Line 104: warning: exported function LoadCfg should have comment or be unexported (golint)
    • Line 116: warning: exported function LoadCfgs should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign77%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!