Preparing report...

Report for github.com/sqjian/go-kit

A    Great!    Found 26 issues across 36 files

Tweet

gofmt83%

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!


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!


golint38%

Golint is a linter for Go source code.

    • go-kit/unique/err.go
    • Line 9: warning: comment on exported type Err should be of the form "Err ..." (with optional leading article) (golint)
    • Line 12: warning: exported function ErrWrapper should have comment or be unexported (golint)
    • Line 17: warning: exported const UnknownErrCode should have comment (or a comment on this block) or be unexported (golint)
    • go-kit/digest/keytype.go
    • Line 3: warning: comment on exported type KeyType should be of the form "KeyType ..." (with optional leading article) (golint)
    • Line 7: warning: exported const UnknownKeyType should have comment (or a comment on this block) or be unexported (golint)
    • go-kit/log/preset/err.go
    • Line 9: warning: comment on exported type Err should be of the form "Err ..." (with optional leading article) (golint)
    • Line 12: warning: exported function ErrWrapper should have comment or be unexported (golint)
    • Line 17: warning: exported const UnknownErrCode should have comment (or a comment on this block) or be unexported (golint)
    • go-kit/unique/generator.go
    • Line 8: warning: comment on exported type KeyType should be of the form "KeyType ..." (with optional leading article) (golint)
    • Line 12: warning: exported const Snowflake should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type Generator should have comment or be unexported (golint)
    • Line 46: warning: exported function NewGenerator should have comment or be unexported (golint)
    • go-kit/pool/connection/pool.go
    • Line 13: warning: exported var DefaultDialRetryCount should have comment or be unexported (golint)
    • Line 20: warning: exported type ClientPool should have comment or be unexported (golint)
    • Line 42: warning: exported function NewClientPool should have comment or be unexported (golint)
    • Line 96: warning: exported method ClientPool.Start should have comment or be unexported (golint)
    • Line 101: warning: exported method ClientPool.Get should have comment or be unexported (golint)
    • Line 143: warning: exported method ClientPool.Put should have comment or be unexported (golint)
    • Line 166: warning: exported method ClientPool.Release should have comment or be unexported (golint)
    • go-kit/log/provider/zap/opt.go
    • Line 7: warning: exported type Option should have comment or be unexported (golint)
    • Line 17: warning: exported function WithFileName should have comment or be unexported (golint)
    • Line 23: warning: exported function WithMaxSize should have comment or be unexported (golint)
    • Line 29: warning: exported function WithMaxBackups should have comment or be unexported (golint)
    • Line 35: warning: exported function WithMaxAge should have comment or be unexported (golint)
    • Line 41: warning: exported function WithLevel should have comment or be unexported (golint)
    • Line 47: warning: exported function WithConsole should have comment or be unexported (golint)
    • go-kit/digest/err.go
    • Line 9: warning: comment on exported type Err should be of the form "Err ..." (with optional leading article) (golint)
    • Line 12: warning: exported function ErrWrapper should have comment or be unexported (golint)
    • Line 17: warning: exported const UnknownErrCode should have comment (or a comment on this block) or be unexported (golint)
    • go-kit/log/preset/logtype.go
    • Line 3: warning: comment on exported type LogType should be of the form "LogType ..." (with optional leading article) (golint)
    • Line 8: warning: exported const Zap should have comment (or a comment on this block) or be unexported (golint)
    • go-kit/pool/connection/opt.go
    • Line 9: warning: exported type Option should have comment or be unexported (golint)
    • Line 13: warning: exported type OptionFunc should have comment or be unexported (golint)
    • Line 19: warning: exported function WithAddress should have comment or be unexported (golint)
    • Line 25: warning: exported function WithPort should have comment or be unexported (golint)
    • Line 31: warning: exported function WithDial should have comment or be unexported (golint)
    • Line 37: warning: exported function WithClose should have comment or be unexported (golint)
    • Line 43: warning: exported function WithKeepAlive should have comment or be unexported (golint)
    • Line 49: warning: exported function WithInitialPoolSize should have comment or be unexported (golint)
    • Line 55: warning: exported function WithMaxPoolSize should have comment or be unexported (golint)
    • Line 61: warning: exported function WithDialRetryCount should have comment or be unexported (golint)
    • Line 67: warning: exported function WithKeepAliveInterval should have comment or be unexported (golint)
    • Line 73: warning: exported function WithDialRetryInterval should have comment or be unexported (golint)
    • Line 79: warning: exported function WithCreateNewInterval should have comment or be unexported (golint)
    • Line 85: warning: exported function WithLogger should have comment or be unexported (golint)
    • go-kit/template/bininfo/bin.go
    • Line 11: warning: exported var GitTag should have comment or be unexported (golint)
    • Line 18: warning: exported function StringifySingleLine should have comment or be unexported (golint)
    • Line 23: warning: exported function StringifyMultiLine should have comment or be unexported (golint)
    • go-kit/template/err/err.go
    • Line 9: warning: comment on exported type Err should be of the form "Err ..." (with optional leading article) (golint)
    • Line 12: warning: exported function ErrWrapper should have comment or be unexported (golint)
    • Line 17: warning: exported const UnknownCode should have comment (or a comment on this block) or be unexported (golint)
    • go-kit/digest/generator.go
    • Line 7: warning: exported type Generator should have comment or be unexported (golint)
    • Line 24: warning: exported function NewGenerator should have comment or be unexported (golint)
    • go-kit/log/preset/level.go
    • Line 3: warning: comment on exported type Level should be of the form "Level ..." (with optional leading article) (golint)
    • Line 7: warning: exported const UnknownLevel should have comment (or a comment on this block) or be unexported (golint)
    • go-kit/unique/opt.go
    • Line 3: warning: exported type Option should have comment or be unexported (golint)
    • Line 13: warning: exported function WithSnowflakeNodeId should have comment or be unexported (golint)
    • go-kit/log/log.go
    • Line 8: warning: exported type Logger should have comment or be unexported (golint)
    • Line 38: warning: exported function NewLogger should have comment or be unexported (golint)
    • go-kit/log/opt.go
    • Line 5: warning: exported type Option should have comment or be unexported (golint)
    • Line 15: warning: exported function WithFileName should have comment or be unexported (golint)
    • Line 21: warning: exported function WithMaxSize should have comment or be unexported (golint)
    • Line 27: warning: exported function WithMaxBackups should have comment or be unexported (golint)
    • Line 33: warning: exported function WithMaxAge should have comment or be unexported (golint)
    • Line 39: warning: exported function WithLevel should have comment or be unexported (golint)
    • Line 45: warning: exported function WithConsole should have comment or be unexported (golint)
    • Line 51: warning: exported function WithLogType should have comment or be unexported (golint)
    • go-kit/pool/connection/err.go
    • Line 5: warning: comment on exported type Err should be of the form "Err ..." (with optional leading article) (golint)
    • Line 8: warning: exported function ErrWrapper should have comment or be unexported (golint)
    • Line 13: warning: exported const UnknownErrCode should have comment (or a comment on this block) or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign80%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!