Preparing report...

Report for github.com/flike/idgo

A    Great!    Found 6 issues across 7 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!


golint28%

Golint is a linter for Go source code.

    • idgo/config/config.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 16: warning: exported type DBConfig should have comment or be unexported (golint)
    • Line 25: warning: exported function ParseConfigFile should have comment or be unexported (golint)
    • idgo/cmd/idgo/main.go
    • Line 23: warning: exported const MaxLogSize should have comment (or a comment on this block) or be unexported (golint)
    • idgo/server/idgo.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 12: warning: comment on exported const CreateTableSQLFormat should be of the form "CreateTableSQLFormat ..." (golint)
    • Line 19: warning: comment on exported const CreateTableNTSQLFormat should be of the form "CreateTableNTSQLFormat ..." (golint)
    • Line 26: warning: exported const DropTableSQLFormat should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported type MySQLIdGenerator should have comment or be unexported (golint)
    • Line 46: warning: exported function NewMySQLIdGenerator should have comment or be unexported (golint)
    • Line 63: warning: exported method MySQLIdGenerator.SetSection should have comment or be unexported (golint)
    • Line 95: warning: comment on exported method MySQLIdGenerator.Current should be of the form "Current ..." (golint)
    • Line 103: warning: exported method MySQLIdGenerator.Next should have comment or be unexported (golint)
    • Line 149: warning: exported method MySQLIdGenerator.Init should have comment or be unexported (golint)
    • Line 163: warning: comment on exported method MySQLIdGenerator.Reset should be of the form "Reset ..." (golint)
    • Line 224: warning: exported method MySQLIdGenerator.DelKeyTable should have comment or be unexported (golint)
    • idgo/server/proto.go
    • Line 12: warning: exported type Request should have comment or be unexported (golint)
    • Line 19: warning: exported method Request.HasArgument should have comment or be unexported (golint)
    • Line 23: warning: exported method Request.ExpectArgument should have comment or be unexported (golint)
    • Line 30: warning: exported method Request.GetInt should have comment or be unexported (golint)
    • Line 36: 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 41: warning: exported function NewRequest should have comment or be unexported (golint)
    • Line 108: warning: exported function Malformed should have comment or be unexported (golint)
    • Line 112: warning: exported function MalformedLength should have comment or be unexported (golint)
    • Line 116: warning: exported function MalformedMissingCRLF should have comment or be unexported (golint)
    • Line 120: warning: exported type Reply should have comment or be unexported (golint)
    • Line 123: warning: exported var ErrMethodNotSupported should have comment or be unexported (golint)
    • Line 135: warning: exported type ErrorReply should have comment or be unexported (golint)
    • Line 139: warning: exported method ErrorReply.WriteTo should have comment or be unexported (golint)
    • Line 148: warning: exported type StatusReply should have comment or be unexported (golint)
    • Line 152: warning: exported method StatusReply.WriteTo should have comment or be unexported (golint)
    • Line 157: warning: exported type IntReply should have comment or be unexported (golint)
    • Line 161: warning: exported method IntReply.WriteTo should have comment or be unexported (golint)
    • Line 166: warning: exported type BulkReply should have comment or be unexported (golint)
    • Line 170: warning: exported method BulkReply.WriteTo should have comment or be unexported (golint)
    • Line 174: warning: exported type MultiBulkReply should have comment or be unexported (golint)
    • Line 178: warning: exported method MultiBulkReply.WriteTo should have comment or be unexported (golint)
    • Line 184: 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)
    • idgo/server/server.go
    • Line 15: warning: exported const KeyRecordTableName should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: comment on exported const CreateRecordTableNTSQLFormat should be of the form "CreateRecordTableNTSQLFormat ..." (golint)
    • Line 35: warning: exported type Server should have comment or be unexported (golint)
    • Line 45: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 88: warning: exported method Server.Init should have comment or be unexported (golint)
    • Line 126: warning: exported method Server.Serve should have comment or be unexported (golint)
    • Line 178: warning: exported method Server.ServeRequest should have comment or be unexported (golint)
    • Line 197: warning: exported method Server.Close should have comment or be unexported (golint)
    • Line 205: warning: exported method Server.IsKeyExist should have comment or be unexported (golint)
    • Line 230: warning: exported method Server.GetKey should have comment or be unexported (golint)
    • Line 250: warning: exported method Server.SetKey should have comment or be unexported (golint)
    • Line 257: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 267: warning: exported method Server.DelKey should have comment or be unexported (golint)
    • Line 279: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license0%

Checks whether your project has a LICENSE file.


ineffassign85%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!