Preparing report...

Report for github.com/flike/kingshard

B    Not bad!    Found 55 issues across 68 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!


gocyclo76%

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.

    • kingshard/sqlparser/token.go
    • Line 170: warning: cyclomatic complexity 31 of function (*Tokenizer).Scan() is high (> 15) (gocyclo)
    • Line 302: warning: cyclomatic complexity 16 of function (*Tokenizer).scanNumber() is high (> 15) (gocyclo)
    • kingshard/proxy/router/planbuilder.go
    • Line 111: warning: cyclomatic complexity 24 of function (*Plan).getRangeShardTableIndex() is high (> 15) (gocyclo)
    • Line 362: warning: cyclomatic complexity 22 of function (*Plan).getTableIndexByBoolExpr() is high (> 15) (gocyclo)
    • Line 203: warning: cyclomatic complexity 22 of function (*Plan).getDateShardTableIndex() is high (> 15) (gocyclo)
    • kingshard/proxy/server/conn_select.go
    • Line 589: warning: cyclomatic complexity 19 of function (*ClientConn).getMaxFuncExprValue() is high (> 15) (gocyclo)
    • Line 645: warning: cyclomatic complexity 19 of function (*ClientConn).getMinFuncExprValue() is high (> 15) (gocyclo)
    • Line 702: warning: cyclomatic complexity 17 of function (*ClientConn).calFuncExprValue() is high (> 15) (gocyclo)

golint30%

Golint is a linter for Go source code.

    • kingshard/mysql/packetio.go
    • Line 28: warning: exported type PacketIO should have comment or be unexported (golint)
    • Line 35: warning: exported function NewPacketIO should have comment or be unexported (golint)
    • Line 46: warning: exported method PacketIO.ReadPacket should have comment or be unexported (golint)
    • Line 69: 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 78: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 84: warning: comment on exported method PacketIO.WritePacket should be of the form "WritePacket ..." (golint)
    • Line 122: warning: exported method PacketIO.WritePacketBatch should have comment or be unexported (golint)
    • kingshard/mysql/util_test.go
    • Line 37: warning: don't use underscores in Go names; var hex_test should be hexTest (golint)
    • Line 41: warning: don't use underscores in Go names; var hex_seed should be hexSeed (golint)
    • Line 46: warning: don't use underscores in Go names; var hex_scramble should be hexScramble (golint)
    • kingshard/config/config.go
    • Line 26: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 48: warning: comment on exported type UserConfig should be of the form "UserConfig ..." (with optional leading article) (golint)
    • Line 54: warning: comment on exported type NodeConfig should be of the form "NodeConfig ..." (with optional leading article) (golint)
    • Line 67: warning: comment on exported type SchemaConfig should be of the form "SchemaConfig ..." (with optional leading article) (golint)
    • Line 75: warning: comment on exported type ShardConfig should be of the form "ShardConfig ..." (with optional leading article) (golint)
    • Line 87: warning: exported function ParseConfigData should have comment or be unexported (golint)
    • Line 95: warning: exported function ParseConfigFile should have comment or be unexported (golint)
    • Line 106: warning: exported function WriteConfigFile should have comment or be unexported (golint)
    • kingshard/monitor/prometheus.go
    • Line 29: warning: exported type Prometheus should have comment or be unexported (golint)
    • Line 35: warning: comment on exported function NewPrometheus should be of the form "NewPrometheus ..." (golint)
    • Line 48: warning: comment on exported method Prometheus.Run should be of the form "Run ..." (golint)
    • kingshard/core/golog/handler.go
    • Line 32: warning: exported function NewStreamHandler should have comment or be unexported (golint)
    • Line 44: warning: exported method StreamHandler.Close should have comment or be unexported (golint)
    • Line 52: warning: exported function NewNullHandler should have comment or be unexported (golint)
    • Line 60: warning: exported method NullHandler.Close should have comment or be unexported (golint)
    • kingshard/backend/backend_conn.go
    • Line 33: warning: comment on exported type Conn should be of the form "Conn ..." (with optional leading article) (golint)
    • Line 56: warning: exported method Conn.Connect should have comment or be unexported (golint)
    • Line 69: warning: exported method Conn.ReConnect should have comment or be unexported (golint)
    • Line 125: warning: exported method Conn.Close should have comment or be unexported (golint)
    • Line 344: warning: exported method Conn.Ping should have comment or be unexported (golint)
    • Line 358: warning: exported method Conn.UseDB should have comment or be unexported (golint)
    • Line 375: warning: exported method Conn.GetDB should have comment or be unexported (golint)
    • Line 379: warning: exported method Conn.GetAddr should have comment or be unexported (golint)
    • Line 383: warning: exported method Conn.Execute should have comment or be unexported (golint)
    • Line 386: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 389: 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 398: warning: exported method Conn.ClosePrepare should have comment or be unexported (golint)
    • Line 402: warning: exported method Conn.Begin should have comment or be unexported (golint)
    • Line 407: warning: exported method Conn.Commit should have comment or be unexported (golint)
    • Line 412: warning: exported method Conn.Rollback should have comment or be unexported (golint)
    • Line 417: warning: exported method Conn.SetAutoCommit should have comment or be unexported (golint)
    • Line 434: warning: exported method Conn.SetCharset should have comment or be unexported (golint)
    • Line 457: 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 464: warning: exported method Conn.FieldList should have comment or be unexported (golint)
    • Line 478: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 714: warning: exported method Conn.IsAutoCommit should have comment or be unexported (golint)
    • Line 718: warning: exported method Conn.IsInTransaction should have comment or be unexported (golint)
    • Line 722: warning: exported method Conn.GetCharset should have comment or be unexported (golint)
    • kingshard/backend/balancer.go
    • Line 24: warning: exported function Gcd should have comment or be unexported (golint)
    • Line 53: warning: exported method Node.InitBalancer should have comment or be unexported (golint)
    • Line 82: warning: exported method Node.GetNextSlave should have comment or be unexported (golint)
    • kingshard/mysql/charset.go
    • Line 17: warning: exported type CollationId should have comment or be unexported (golint)
    • Line 19: warning: comment on exported var CharsetIds should be of the form "CharsetIds ..." (golint)
    • Line 63: warning: comment on exported var Charsets should be of the form "Charsets ..." (golint)
    • Line 107: warning: exported var Collations should have comment or be unexported (golint)
    • Line 329: warning: exported var CollationNames should have comment or be unexported (golint)
    • Line 552: warning: exported var DEFAULT_CHARSET should have comment or be unexported (golint)
    • kingshard/sqlparser/analyzer.go
    • Line 50: warning: comment on exported function GetDBTable should be of the form "GetDBTable ..." (golint)
    • Line 59: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 64: warning: exported function GetInsertDBTable should have comment or be unexported (golint)
    • Line 73: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 94: warning: comment on exported function IsValue should be of the form "IsValue ..." (golint)
    • Line 104: warning: comment on exported function HasINClause should be of the form "HasINClause ..." (golint)
    • kingshard/mysql/util.go
    • Line 28: warning: exported function Pstack should have comment or be unexported (golint)
    • Line 34: warning: exported function CalcPassword should have comment or be unexported (golint)
    • Line 63: warning: comment on exported function RandomBuf should be of the form "RandomBuf ..." (golint)
    • Line 74: warning: exported function LengthEncodedInt should have comment or be unexported (golint)
    • Line 110: warning: exported function PutLengthEncodedInt should have comment or be unexported (golint)
    • Line 128: warning: exported function LengthEnodedString should have comment or be unexported (golint)
    • Line 144: warning: exported function SkipLengthEnodedString should have comment or be unexported (golint)
    • Line 160: warning: exported function PutLengthEncodedString should have comment or be unexported (golint)
    • Line 167: warning: exported function Uint16ToBytes should have comment or be unexported (golint)
    • Line 174: warning: exported function Uint32ToBytes should have comment or be unexported (golint)
    • Line 183: warning: exported function Uint64ToBytes should have comment or be unexported (golint)
    • Line 196: warning: exported function FormatBinaryDate should have comment or be unexported (golint)
    • Line 210: warning: exported function FormatBinaryDateTime should have comment or be unexported (golint)
    • Line 243: warning: exported function FormatBinaryTime should have comment or be unexported (golint)
    • Line 277: warning: exported var DONTESCAPE should have comment or be unexported (golint)
    • Line 282: warning: exported function Escape should have comment or be unexported (golint)
    • kingshard/proxy/server/conn_select.go
    • Line 31: warning: exported const MasterComment should have comment (or a comment on this block) or be unexported (golint)
    • Line 74: 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 294: warning: exported type ResultRow should have comment or be unexported (golint)
    • Line 443: 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 452: 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 584: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 595: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 651: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • kingshard/sqlparser/ast.go
    • Line 41: warning: comment on exported function Parse should be of the form "Parse ..." (golint)
    • Line 71: warning: exported method Union.IStatement should have comment or be unexported (golint)
    • Line 72: warning: exported method Select.IStatement should have comment or be unexported (golint)
    • Line 73: warning: exported method Insert.IStatement should have comment or be unexported (golint)
    • Line 74: warning: exported method Update.IStatement should have comment or be unexported (golint)
    • Line 75: warning: exported method Delete.IStatement should have comment or be unexported (golint)
    • Line 76: warning: exported method Set.IStatement should have comment or be unexported (golint)
    • Line 77: warning: exported method DDL.IStatement should have comment or be unexported (golint)
    • Line 87: warning: exported method Select.ISelectStatement should have comment or be unexported (golint)
    • Line 88: warning: exported method Union.ISelectStatement should have comment or be unexported (golint)
    • Line 115: warning: exported method Select.Format should have comment or be unexported (golint)
    • Line 138: warning: exported method Union.Format should have comment or be unexported (golint)
    • Line 152: warning: exported method Insert.Format should have comment or be unexported (golint)
    • Line 164: warning: exported method Select.IInsertRows should have comment or be unexported (golint)
    • Line 165: warning: exported method Union.IInsertRows should have comment or be unexported (golint)
    • Line 166: warning: exported method Values.IInsertRows should have comment or be unexported (golint)
    • Line 178: warning: exported method Update.Format should have comment or be unexported (golint)
    • Line 193: warning: exported method Delete.Format should have comment or be unexported (golint)
    • Line 205: warning: exported method Set.Format should have comment or be unexported (golint)
    • Line 221: warning: exported const AST_CREATE should have comment (or a comment on this block) or be unexported (golint)
    • Line 227: warning: exported method DDL.Format should have comment or be unexported (golint)
    • Line 243: warning: exported method Comments.Format should have comment or be unexported (golint)
    • Line 252: warning: exported method SelectExprs.Format should have comment or be unexported (golint)
    • Line 266: warning: exported method StarExpr.ISelectExpr should have comment or be unexported (golint)
    • Line 267: warning: exported method NonStarExpr.ISelectExpr should have comment or be unexported (golint)
    • Line 274: warning: exported method StarExpr.Format should have comment or be unexported (golint)
    • Line 287: warning: exported method NonStarExpr.Format should have comment or be unexported (golint)
    • Line 300: warning: exported method Columns.Format should have comment or be unexported (golint)
    • Line 310: warning: exported method TableExprs.Format should have comment or be unexported (golint)
    • Line 324: warning: exported method AliasedTableExpr.ITableExpr should have comment or be unexported (golint)
    • Line 325: warning: exported method ParenTableExpr.ITableExpr should have comment or be unexported (golint)
    • Line 326: warning: exported method JoinTableExpr.ITableExpr should have comment or be unexported (golint)
    • Line 336: warning: exported method AliasedTableExpr.Format should have comment or be unexported (golint)
    • Line 353: warning: exported method TableName.ISimpleTableExpr should have comment or be unexported (golint)
    • Line 354: warning: exported method Subquery.ISimpleTableExpr should have comment or be unexported (golint)
    • Line 361: warning: exported method TableName.Format should have comment or be unexported (golint)
    • Line 374: warning: exported method ParenTableExpr.Format should have comment or be unexported (golint)
    • Line 396: warning: exported method JoinTableExpr.Format should have comment or be unexported (golint)
    • Line 410: warning: exported const AST_USE should have comment (or a comment on this block) or be unexported (golint)
    • Line 415: warning: exported method IndexHints.Format should have comment or be unexported (golint)
    • Line 446: warning: exported method Where.Format should have comment or be unexported (golint)
    • Line 459: warning: exported method AndExpr.IExpr should have comment or be unexported (golint)
    • Line 460: warning: exported method OrExpr.IExpr should have comment or be unexported (golint)
    • Line 461: warning: exported method NotExpr.IExpr should have comment or be unexported (golint)
    • Line 462: warning: exported method ParenBoolExpr.IExpr should have comment or be unexported (golint)
    • Line 463: warning: exported method ComparisonExpr.IExpr should have comment or be unexported (golint)
    • Line 464: warning: exported method RangeCond.IExpr should have comment or be unexported (golint)
    • Line 465: warning: exported method NullCheck.IExpr should have comment or be unexported (golint)
    • Line 466: warning: exported method ExistsExpr.IExpr should have comment or be unexported (golint)
    • Line 467: warning: exported method StrVal.IExpr should have comment or be unexported (golint)
    • Line 468: warning: exported method NumVal.IExpr should have comment or be unexported (golint)
    • Line 469: warning: exported method ValArg.IExpr should have comment or be unexported (golint)
    • Line 470: warning: exported method NullVal.IExpr should have comment or be unexported (golint)
    • Line 471: warning: exported method ColName.IExpr should have comment or be unexported (golint)
    • Line 472: warning: exported method ValTuple.IExpr should have comment or be unexported (golint)
    • Line 473: warning: exported method Subquery.IExpr should have comment or be unexported (golint)
    • Line 474: warning: exported method BinaryExpr.IExpr should have comment or be unexported (golint)
    • Line 475: warning: exported method UnaryExpr.IExpr should have comment or be unexported (golint)
    • Line 476: warning: exported method FuncExpr.IExpr should have comment or be unexported (golint)
    • Line 477: warning: exported method CaseExpr.IExpr should have comment or be unexported (golint)
    • Line 485: warning: exported method AndExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 486: warning: exported method OrExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 487: warning: exported method NotExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 488: warning: exported method ParenBoolExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 489: warning: exported method ComparisonExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 490: warning: exported method RangeCond.IBoolExpr should have comment or be unexported (golint)
    • Line 491: warning: exported method NullCheck.IBoolExpr should have comment or be unexported (golint)
    • Line 492: warning: exported method ExistsExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 499: warning: exported method AndExpr.Format should have comment or be unexported (golint)
    • Line 508: warning: exported method OrExpr.Format should have comment or be unexported (golint)
    • Line 517: warning: exported method NotExpr.Format should have comment or be unexported (golint)
    • Line 526: warning: exported method ParenBoolExpr.Format should have comment or be unexported (golint)
    • Line 551: warning: exported method ComparisonExpr.Format should have comment or be unexported (golint)
    • Line 568: warning: exported method RangeCond.Format should have comment or be unexported (golint)
    • Line 584: warning: exported method NullCheck.Format should have comment or be unexported (golint)
    • Line 593: warning: exported method ExistsExpr.Format should have comment or be unexported (golint)
    • Line 603: warning: exported method StrVal.IValExpr should have comment or be unexported (golint)
    • Line 604: warning: exported method NumVal.IValExpr should have comment or be unexported (golint)
    • Line 605: warning: exported method ValArg.IValExpr should have comment or be unexported (golint)
    • Line 606: warning: exported method NullVal.IValExpr should have comment or be unexported (golint)
    • Line 607: warning: exported method ColName.IValExpr should have comment or be unexported (golint)
    • Line 608: warning: exported method ValTuple.IValExpr should have comment or be unexported (golint)
    • Line 609: warning: exported method Subquery.IValExpr should have comment or be unexported (golint)
    • Line 610: warning: exported method BinaryExpr.IValExpr should have comment or be unexported (golint)
    • Line 611: warning: exported method UnaryExpr.IValExpr should have comment or be unexported (golint)
    • Line 612: warning: exported method FuncExpr.IValExpr should have comment or be unexported (golint)
    • Line 613: warning: exported method CaseExpr.IValExpr should have comment or be unexported (golint)
    • Line 618: warning: exported method StrVal.Format should have comment or be unexported (golint)
    • Line 626: warning: exported method NumVal.Format should have comment or be unexported (golint)
    • Line 633: warning: exported method ValArg.Format should have comment or be unexported (golint)
    • Line 640: warning: exported method NullVal.Format should have comment or be unexported (golint)
    • Line 649: warning: exported method ColName.Format should have comment or be unexported (golint)
    • Line 671: warning: exported method ValTuple.ITuple should have comment or be unexported (golint)
    • Line 672: warning: exported method Subquery.ITuple should have comment or be unexported (golint)
    • Line 677: warning: exported method ValTuple.Format should have comment or be unexported (golint)
    • Line 685: warning: exported method ValExprs.Format should have comment or be unexported (golint)
    • Line 698: warning: exported method Subquery.Format should have comment or be unexported (golint)
    • Line 720: warning: exported method BinaryExpr.Format should have comment or be unexported (golint)
    • Line 737: warning: exported method UnaryExpr.Format should have comment or be unexported (golint)
    • Line 748: warning: exported method FuncExpr.Format should have comment or be unexported (golint)
    • Line 763: warning: exported method CaseExpr.Format should have comment or be unexported (golint)
    • Line 783: warning: exported method When.Format should have comment or be unexported (golint)
    • Line 790: warning: exported method Values.Format should have comment or be unexported (golint)
    • Line 801: warning: exported method GroupBy.Format should have comment or be unexported (golint)
    • Line 812: warning: exported method OrderBy.Format should have comment or be unexported (golint)
    • Line 832: warning: exported method Order.Format should have comment or be unexported (golint)
    • Line 841: warning: exported method Limit.RewriteLimit should have comment or be unexported (golint)
    • Line 855: 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 864: 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 876: warning: exported method Limit.Format should have comment or be unexported (golint)
    • Line 890: warning: exported method UpdateExprs.Format should have comment or be unexported (golint)
    • Line 904: warning: exported method UpdateExpr.Format should have comment or be unexported (golint)
    • Line 911: warning: exported method OnDup.Format should have comment or be unexported (golint)
    • Line 918: warning: exported method Begin.IStatement should have comment or be unexported (golint)
    • Line 919: warning: exported method Commit.IStatement should have comment or be unexported (golint)
    • Line 920: warning: exported method Rollback.IStatement should have comment or be unexported (golint)
    • Line 922: warning: exported type Begin should have comment or be unexported (golint)
    • Line 925: warning: exported method Begin.Format should have comment or be unexported (golint)
    • Line 929: warning: exported type Commit should have comment or be unexported (golint)
    • Line 932: warning: exported method Commit.Format should have comment or be unexported (golint)
    • Line 936: warning: exported type Rollback should have comment or be unexported (golint)
    • Line 939: warning: exported method Rollback.Format should have comment or be unexported (golint)
    • Line 951: warning: exported method Replace.Format should have comment or be unexported (golint)
    • Line 957: warning: exported method Replace.IStatement should have comment or be unexported (golint)
    • Line 959: warning: exported type SimpleSelect should have comment or be unexported (golint)
    • Line 965: warning: exported method SimpleSelect.Format should have comment or be unexported (golint)
    • Line 969: warning: exported method SimpleSelect.IStatement should have comment or be unexported (golint)
    • Line 970: warning: exported method SimpleSelect.ISelectStatement should have comment or be unexported (golint)
    • Line 971: warning: exported method SimpleSelect.IInsertRows should have comment or be unexported (golint)
    • Line 973: warning: exported type Admin should have comment or be unexported (golint)
    • Line 979: warning: exported method Admin.IStatement should have comment or be unexported (golint)
    • Line 981: warning: exported method Admin.Format should have comment or be unexported (golint)
    • Line 985: warning: exported type AdminHelp should have comment or be unexported (golint)
    • Line 988: warning: exported method AdminHelp.IStatement should have comment or be unexported (golint)
    • Line 990: warning: exported method AdminHelp.Format should have comment or be unexported (golint)
    • Line 994: warning: exported type Show should have comment or be unexported (golint)
    • Line 1001: warning: exported method Show.IStatement should have comment or be unexported (golint)
    • Line 1003: warning: exported method Show.Format should have comment or be unexported (golint)
    • Line 1007: warning: exported type UseDB should have comment or be unexported (golint)
    • Line 1011: warning: exported method UseDB.IStatement should have comment or be unexported (golint)
    • Line 1013: warning: exported method UseDB.Format should have comment or be unexported (golint)
    • Line 1017: warning: exported type Truncate should have comment or be unexported (golint)
    • Line 1024: warning: exported const AST_TABLE should have comment (or a comment on this block) or be unexported (golint)
    • Line 1027: warning: exported method Truncate.IStatement should have comment or be unexported (golint)
    • Line 1029: warning: exported method Truncate.Format should have comment or be unexported (golint)
    • kingshard/proxy/router/numkey.go
    • Line 28: warning: exported const MinNumKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported type NumKeyRange should be of the form "NumKeyRange ..." (with optional leading article) (golint)
    • Line 38: warning: exported method NumKeyRange.MapKey should have comment or be unexported (golint)
    • Line 42: warning: exported method NumKeyRange.Contains should have comment or be unexported (golint)
    • Line 50: warning: exported function ParseNumSharding should have comment or be unexported (golint)
    • Line 66: warning: comment on exported function ParseDayRange should be of the form "ParseDayRange ..." (golint)
    • Line 120: warning: comment on exported function ParseMonthRange should be of the form "ParseMonthRange ..." (golint)
    • Line 183: warning: comment on exported function ParseYearRange should be of the form "ParseYearRange ..." (golint)
    • kingshard/proxy/router/router.go
    • Line 28: warning: exported var DefaultRuleType should have comment or be unexported (golint)
    • Line 39: warning: exported type Rule should have comment or be unexported (golint)
    • Line 51: warning: exported type Router should have comment or be unexported (golint)
    • Line 58: warning: exported function NewDefaultRule should have comment or be unexported (golint)
    • Line 68: warning: exported method Rule.FindNode should have comment or be unexported (golint)
    • Line 77: warning: exported method Rule.FindNodeIndex should have comment or be unexported (golint)
    • Line 85: warning: exported method Rule.FindTableIndex should have comment or be unexported (golint)
    • Line 136: 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 148: warning: exported method Router.GetRule should have comment or be unexported (golint)
    • Line 159: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 286: warning: comment on exported method Router.BuildPlan should be of the form "BuildPlan ..." (golint)
    • kingshard/backend/node.go
    • Line 30: warning: exported const Master should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported type Node should have comment or be unexported (golint)
    • Line 52: warning: exported method Node.CheckNode should have comment or be unexported (golint)
    • Line 66: warning: exported method Node.GetMasterConn should have comment or be unexported (golint)
    • Line 78: warning: exported method Node.GetSlaveConn should have comment or be unexported (golint)
    • Line 165: warning: exported method Node.AddSlave should have comment or be unexported (golint)
    • Line 191: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 198: warning: exported method Node.DeleteSlave should have comment or be unexported (golint)
    • Line 236: warning: exported method Node.OpenDB should have comment or be unexported (golint)
    • Line 241: warning: exported method Node.UpDB should have comment or be unexported (golint)
    • Line 257: warning: exported method Node.UpMaster should have comment or be unexported (golint)
    • Line 267: warning: exported method Node.UpSlave should have comment or be unexported (golint)
    • Line 287: warning: exported method Node.DownMaster should have comment or be unexported (golint)
    • Line 298: warning: exported method Node.DownSlave should have comment or be unexported (golint)
    • Line 319: warning: exported method Node.ParseMaster should have comment or be unexported (golint)
    • Line 329: warning: comment on exported method Node.ParseSlave should be of the form "ParseSlave ..." (golint)
    • kingshard/mysql/resultset.go
    • Line 26: warning: exported type RowData should have comment or be unexported (golint)
    • Line 28: warning: exported method RowData.Parse should have comment or be unexported (golint)
    • Line 31: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 36: warning: exported method RowData.ParseText should have comment or be unexported (golint)
    • Line 84: warning: exported method RowData.ParseBinary should have comment or be unexported (golint)
    • Line 264: warning: exported type Result should have comment or be unexported (golint)
    • Line 273: warning: exported type Resultset should have comment or be unexported (golint)
    • Line 281: warning: exported method Resultset.RowNumber should have comment or be unexported (golint)
    • Line 285: warning: exported method Resultset.ColumnNumber should have comment or be unexported (golint)
    • Line 289: warning: exported method Resultset.GetValue should have comment or be unexported (golint)
    • Line 301: warning: exported method Resultset.NameIndex should have comment or be unexported (golint)
    • Line 304: 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 309: warning: exported method Resultset.GetValueByName should have comment or be unexported (golint)
    • Line 312: 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 317: warning: exported method Resultset.IsNull should have comment or be unexported (golint)
    • Line 326: warning: exported method Resultset.IsNullByName should have comment or be unexported (golint)
    • Line 329: 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 334: warning: exported method Resultset.GetUint should have comment or be unexported (golint)
    • Line 358: warning: exported method Resultset.GetUintByName should have comment or be unexported (golint)
    • Line 361: 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 366: warning: exported method Resultset.GetIntByName should have comment or be unexported (golint)
    • Line 369: 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 374: warning: exported method Resultset.GetInt should have comment or be unexported (golint)
    • Line 398: warning: exported method Resultset.GetFloat should have comment or be unexported (golint)
    • Line 422: warning: exported method Resultset.GetFloatByName should have comment or be unexported (golint)
    • Line 425: 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 430: warning: exported method Resultset.GetString should have comment or be unexported (golint)
    • Line 454: warning: exported method Resultset.GetStringByName should have comment or be unexported (golint)
    • Line 457: 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)
    • kingshard/proxy/server/util.go
    • Line 9: warning: exported type BoolIndex should have comment or be unexported (golint)
    • Line 13: warning: exported method BoolIndex.Set should have comment or be unexported (golint)
    • Line 21: warning: exported method BoolIndex.Get should have comment or be unexported (golint)
    • Line 25: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 30: warning: exported type IPInfo should have comment or be unexported (golint)
    • Line 37: warning: exported function ParseIPInfo should have comment or be unexported (golint)
    • Line 58: warning: exported method IPInfo.Info should have comment or be unexported (golint)
    • Line 62: warning: exported method IPInfo.Match should have comment or be unexported (golint)
    • Line 65: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • kingshard/sqltypes/sqltypes.go
    • Line 34: warning: exported var NULL should have comment or be unexported (golint)
    • Line 118: warning: exported method Value.EncodeSql should have comment or be unexported (golint)
    • Line 139: warning: exported method Value.IsNull should have comment or be unexported (golint)
    • Line 143: warning: exported method Value.IsNumeric should have comment or be unexported (golint)
    • Line 150: warning: exported method Value.IsFractional should have comment or be unexported (golint)
    • Line 157: warning: exported method Value.IsString should have comment or be unexported (golint)
    • Line 208: warning: exported function BuildValue should have comment or be unexported (golint)
    • Line 278: warning: exported method Numeric.MarshalJSON should have comment or be unexported (golint)
    • kingshard/web/api.go
    • Line 30: warning: exported method ApiServer.GetAllowIps should have comment or be unexported (golint)
    • Line 35: warning: comment on exported method ApiServer.AddAllowIps should be of the form "AddAllowIps ..." (golint)
    • Line 53: warning: comment on exported method ApiServer.DelAllowIps should be of the form "DelAllowIps ..." (golint)
    • Line 71: warning: exported type DBStatus should have comment or be unexported (golint)
    • Line 84: warning: comment on exported method ApiServer.GetNodesStatus should be of the form "GetNodesStatus ..." (golint)
    • Line 129: warning: exported method ApiServer.AddOneSlave should have comment or be unexported (golint)
    • Line 145: warning: exported method ApiServer.DeleteOneSlave should have comment or be unexported (golint)
    • Line 161: warning: exported method ApiServer.ChangeSlaveStatus should have comment or be unexported (golint)
    • Line 188: warning: exported method ApiServer.ChangeMasterStatus should have comment or be unexported (golint)
    • Line 215: warning: exported method ApiServer.GetProxyStatus should have comment or be unexported (golint)
    • Line 220: warning: exported method ApiServer.ChangeProxyStatus should have comment or be unexported (golint)
    • Line 241: warning: comment on exported type ShardConfig should be of the form "ShardConfig ..." (with optional leading article) (golint)
    • Line 254: warning: exported method ApiServer.GetProxySchema should have comment or be unexported (golint)
    • Line 283: warning: exported method ApiServer.GetAllBlackSQL should have comment or be unexported (golint)
    • Line 288: warning: exported method ApiServer.AddOneBlackSQL should have comment or be unexported (golint)
    • Line 304: warning: exported method ApiServer.DelOneBlackSQL should have comment or be unexported (golint)
    • Line 324: warning: exported method ApiServer.SwitchSlowSQL should have comment or be unexported (golint)
    • Line 345: warning: exported method ApiServer.SetSlowLogTime should have comment or be unexported (golint)
    • Line 362: warning: exported method ApiServer.GetSlowLogTime should have comment or be unexported (golint)
    • Line 367: warning: exported method ApiServer.SaveProxyConfig should have comment or be unexported (golint)
    • kingshard/proxy/router/planbuilder.go
    • Line 29: warning: exported const EID_NODE should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported type Plan should have comment or be unexported (golint)
    • Line 139: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 153: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 183: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 226: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 240: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 271: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 474: warning: comment on exported method Plan.GetIRKeyIndex should be of the form "GetIRKeyIndex ..." (golint)
    • Line 481: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 727: warning: exported method Plan.TindexsToNindexs should have comment or be unexported (golint)
    • kingshard/mysql/const.go
    • Line 18: warning: exported const MinProtocolVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported const OK_HEADER should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: don't use underscores in Go names; const LocalInFile_HEADER should be LocalInFileHEADER (golint)
    • Line 32: warning: exported const SERVER_STATUS_IN_TRANS should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported const COM_SLEEP should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: exported const CLIENT_LONG_PASSWORD should have comment (or a comment on this block) or be unexported (golint)
    • Line 128: warning: exported const MYSQL_TYPE_NEWDECIMAL should have comment (or a comment on this block) or be unexported (golint)
    • Line 141: warning: exported const NOT_NULL_FLAG should have comment (or a comment on this block) or be unexported (golint)
    • Line 159: warning: exported const AUTH_NAME should have comment (or a comment on this block) or be unexported (golint)
    • Line 163: warning: exported var TK_ID_INSERT should have comment or be unexported (golint)
    • Line 197: warning: comment on exported var COMMENT_PREFIX should be of the form "COMMENT_PREFIX ..." (golint)
    • Line 201: warning: comment on exported var TK_STR_SELECT should be of the form "TK_STR_SELECT ..." (golint)
    • Line 210: warning: comment on exported var TK_STR_COLUMNS should be of the form "TK_STR_COLUMNS ..." (golint)
    • kingshard/mysql/error.go
    • Line 23: warning: exported var ErrBadConn should have comment or be unexported (golint)
    • Line 29: warning: exported type SqlError should have comment or be unexported (golint)
    • Line 39: warning: comment on exported function NewDefaultError should be of the form "NewDefaultError ..." (golint)
    • Line 59: warning: exported function NewError should have comment or be unexported (golint)
    • kingshard/mysql/sql_fingerprint.go
    • Line 27: warning: package comment should be of the form "Package mysql ..." (golint)
    • Line 87: warning: comment on exported function GetFingerprint should be of the form "GetFingerprint ..." (golint)
    • Line 693: warning: exported function Id should have comment or be unexported (golint)
    • kingshard/config/config_test.go
    • Line 103: warning: don't use underscores in Go names; var testNode_2 should be testNode2 (golint)
    • Line 113: warning: don't use underscores in Go names; var testShard_1 should be testShard1 (golint)
    • Line 127: warning: don't use underscores in Go names; var testShard_2 should be testShard2 (golint)
    • kingshard/cmd/kingshard/main.go
    • Line 41: warning: exported const MaxLogSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 45: warning: exported var BuildDate should have comment or be unexported (golint)
    • kingshard/backend/db.go
    • Line 27: warning: exported const Up should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported type DB should have comment or be unexported (golint)
    • Line 57: warning: exported function Open should have comment or be unexported (golint)
    • Line 109: warning: exported method DB.Addr should have comment or be unexported (golint)
    • Line 113: warning: exported method DB.State should have comment or be unexported (golint)
    • Line 126: warning: exported method DB.ConnCount should have comment or be unexported (golint)
    • Line 132: warning: exported method DB.Close should have comment or be unexported (golint)
    • Line 174: warning: exported method DB.Ping should have comment or be unexported (golint)
    • Line 287: warning: exported method DB.PopConn should have comment or be unexported (golint)
    • Line 312: warning: exported method DB.GetConnFromCache should have comment or be unexported (golint)
    • Line 332: warning: exported method DB.GetConnFromIdle should have comment or be unexported (golint)
    • Line 365: warning: exported method DB.PushConn should have comment or be unexported (golint)
    • Line 390: warning: exported type BackendConn should have comment or be unexported (golint)
    • Line 395: warning: exported method BackendConn.Close should have comment or be unexported (golint)
    • Line 406: warning: exported method DB.GetConn should have comment or be unexported (golint)
    • Line 414: warning: exported method DB.SetLastPing should have comment or be unexported (golint)
    • Line 418: warning: exported method DB.GetLastPing should have comment or be unexported (golint)
    • kingshard/sqlparser/tracked_buffer.go
    • Line 26: warning: comment on exported type ParserError should be of the form "ParserError ..." (with optional leading article) (golint)
    • Line 32: warning: exported function NewParserError should have comment or be unexported (golint)
    • Line 58: warning: exported function NewTrackedBuffer should have comment or be unexported (golint)
    • Line 120: warning: exported method TrackedBuffer.WriteArg should have comment or be unexported (golint)
    • kingshard/backend/stmt.go
    • Line 25: warning: exported type Stmt should have comment or be unexported (golint)
    • Line 34: warning: exported method Stmt.ParamNum should have comment or be unexported (golint)
    • Line 38: warning: exported method Stmt.ColumnNum should have comment or be unexported (golint)
    • Line 42: warning: exported method Stmt.GetId should have comment or be unexported (golint)
    • Line 46: warning: exported method Stmt.Execute should have comment or be unexported (golint)
    • Line 54: warning: exported method Stmt.Close should have comment or be unexported (golint)
    • Line 184: warning: exported method Conn.Prepare should have comment or be unexported (golint)
    • kingshard/proxy/server/conn_admin.go
    • Line 34: warning: exported const Master should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: comment on exported const ADMIN_OPT_ADD should be of the form "ADMIN_OPT_ADD ..." (golint)
    • Line 171: warning: exported method ClientConn.AddDatabase should have comment or be unexported (golint)
    • Line 180: warning: exported method ClientConn.DeleteDatabase should have comment or be unexported (golint)
    • Line 189: warning: exported method ClientConn.UpDatabase should have comment or be unexported (golint)
    • Line 200: warning: exported method ClientConn.DownDatabase should have comment or be unexported (golint)
    • Line 417: warning: should omit 2nd value from range; this loop is equivalent to `for user := range ...` (golint)
    • kingshard/proxy/server/conn_preshard.go
    • Line 30: warning: exported type ExecuteDB should have comment or be unexported (golint)
    • Line 128: warning: exported method ClientConn.GetTransExecDB should have comment or be unexported (golint)
    • Line 162: warning: comment on exported method ClientConn.GetExecDB should be of the form "GetExecDB ..." (golint)
    • Line 247: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 296: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 334: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 371: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • kingshard/proxy/server/server.go
    • Line 39: warning: exported type Schema should have comment or be unexported (golint)
    • Line 44: warning: exported type BlacklistSqls should have comment or be unexported (golint)
    • Line 50: warning: exported const Offline should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: exported type Server should have comment or be unexported (golint)
    • Line 82: warning: exported method Server.Status should have comment or be unexported (golint)
    • Line 225: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 258: 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 267: 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 275: 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 281: 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 285: warning: should omit 2nd value from range; this loop is equivalent to `for user := range ...` (golint)
    • Line 397: warning: exported method Server.ChangeProxy should have comment or be unexported (golint)
    • Line 422: warning: exported method Server.ChangeLogSql should have comment or be unexported (golint)
    • Line 439: warning: exported method Server.ChangeSlowLogTime should have comment or be unexported (golint)
    • Line 457: warning: exported method Server.AddAllowIP should have comment or be unexported (golint)
    • Line 483: warning: exported method Server.DelAllowIP should have comment or be unexported (golint)
    • Line 505: warning: exported method Server.GetAllBlackSqls should have comment or be unexported (golint)
    • Line 513: warning: exported method Server.AddBlackSql should have comment or be unexported (golint)
    • Line 538: warning: exported method Server.DelBlackSql should have comment or be unexported (golint)
    • Line 590: warning: exported method Server.SaveProxyConfig should have comment or be unexported (golint)
    • Line 604: warning: exported method Server.Run should have comment or be unexported (golint)
    • Line 623: warning: exported method Server.Close should have comment or be unexported (golint)
    • Line 630: warning: exported method Server.DeleteSlave should have comment or be unexported (golint)
    • Line 659: warning: exported method Server.AddSlave should have comment or be unexported (golint)
    • Line 681: warning: exported method Server.UpMaster should have comment or be unexported (golint)
    • Line 690: warning: exported method Server.UpSlave should have comment or be unexported (golint)
    • Line 699: warning: exported method Server.DownMaster should have comment or be unexported (golint)
    • Line 707: warning: exported method Server.DownSlave should have comment or be unexported (golint)
    • Line 715: warning: exported method Server.GetNode should have comment or be unexported (golint)
    • Line 719: warning: exported method Server.GetAllNodes should have comment or be unexported (golint)
    • Line 723: warning: exported method Server.GetSchema should have comment or be unexported (golint)
    • Line 727: warning: exported method Server.GetSlowLogTime should have comment or be unexported (golint)
    • Line 731: warning: exported method Server.GetAllowIps should have comment or be unexported (golint)
    • Line 742: warning: exported method Server.UpdateConfig should have comment or be unexported (golint)
    • Line 788: warning: should omit 2nd value from range; this loop is equivalent to `for user := range ...` (golint)
    • Line 845: warning: exported method Server.GetMonitorData should have comment or be unexported (golint)
    • kingshard/proxy/server/conn_tx.go
    • Line 44: 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 52: 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)
    • kingshard/sqlparser/token.go
    • Line 29: warning: exported const EOFCHAR should have comment or be unexported (golint)
    • Line 201: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 219: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 243: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 250: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 422: warning: exported method Tokenizer.ConsumeNext should have comment or be unexported (golint)
    • kingshard/core/golog/filehandler.go
    • Line 29: warning: exported function NewFileHandler should have comment or be unexported (golint)
    • Line 49: warning: exported method FileHandler.Close should have comment or be unexported (golint)
    • Line 65: warning: exported function NewRotatingFileHandler should have comment or be unexported (golint)
    • Line 93: warning: exported method RotatingFileHandler.Close should have comment or be unexported (golint)
    • Line 144: warning: exported const WhenSecond should have comment (or a comment on this block) or be unexported (golint)
    • Line 150: warning: exported function NewTimeRotatingFileHandler should have comment or be unexported (golint)
    • Line 212: warning: exported method TimeRotatingFileHandler.Close should have comment or be unexported (golint)
    • kingshard/core/golog/log.go
    • Line 38: warning: exported const Ltime should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported var LevelName should have comment or be unexported (golint)
    • Line 46: warning: exported const LogSqlOn should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: exported type Logger should have comment or be unexported (golint)
    • Line 70: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 92: warning: comment on exported function NewDefault should be of the form "NewDefault ..." (golint)
    • Line 104: warning: exported function Close should have comment or be unexported (golint)
    • Line 146: warning: exported method Logger.Close should have comment or be unexported (golint)
    • Line 159: warning: comment on exported method Logger.SetLevel should be of the form "SetLevel ..." (golint)
    • Line 164: warning: exported method Logger.Level should have comment or be unexported (golint)
    • Line 168: warning: comment on exported method Logger.Output should be of the form "Output ..." (golint)
    • Line 220: warning: exported function SetLevel should have comment or be unexported (golint)
    • Line 224: warning: exported function StdLogger should have comment or be unexported (golint)
    • Line 228: warning: exported function GetLevel should have comment or be unexported (golint)
    • Line 232: warning: comment on exported var GlobalSysLogger should be of the form "GlobalSysLogger ..." (golint)
    • Line 234: warning: exported var GlobalSqlLogger should have comment or be unexported (golint)
    • Line 262: warning: exported function OutputSql should have comment or be unexported (golint)
    • Line 311: warning: exported function Trace should have comment or be unexported (golint)
    • Line 314: warning: exported function Debug should have comment or be unexported (golint)
    • Line 317: warning: exported function Info should have comment or be unexported (golint)
    • Line 320: warning: exported function Warn should have comment or be unexported (golint)
    • Line 323: warning: exported function Error should have comment or be unexported (golint)
    • Line 326: warning: exported function Fatal should have comment or be unexported (golint)
    • kingshard/proxy/router/shard.go
    • Line 33: warning: comment on exported type KeyError should be of the form "KeyError ..." (with optional leading article) (golint)
    • Line 36: warning: exported function NewKeyError should have comment or be unexported (golint)
    • Line 59: warning: exported function EncodeValue should have comment or be unexported (golint)
    • Line 75: warning: exported function HashValue should have comment or be unexported (golint)
    • Line 86: 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 95: warning: exported function NumValue should have comment or be unexported (golint)
    • Line 119: warning: exported type Shard should have comment or be unexported (golint)
    • Line 123: warning: comment on exported type RangeShard should be of the form "RangeShard ..." (with optional leading article) (golint)
    • Line 130: warning: exported type HashShard should have comment or be unexported (golint)
    • Line 134: warning: exported method HashShard.FindForKey should have comment or be unexported (golint)
    • Line 140: warning: exported type NumRangeShard should have comment or be unexported (golint)
    • Line 144: warning: exported method NumRangeShard.FindForKey should have comment or be unexported (golint)
    • Line 154: warning: exported method NumRangeShard.EqualStart should have comment or be unexported (golint)
    • Line 158: warning: exported method NumRangeShard.EqualStop should have comment or be unexported (golint)
    • Line 163: warning: exported type DateYearShard should have comment or be unexported (golint)
    • Line 166: warning: comment on exported method DateYearShard.FindForKey should be of the form "FindForKey ..." (golint)
    • Line 188: warning: exported type DateMonthShard should have comment or be unexported (golint)
    • Line 191: warning: comment on exported method DateMonthShard.FindForKey should be of the form "FindForKey ..." (golint)
    • Line 229: 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 236: warning: exported type DateDayShard should have comment or be unexported (golint)
    • Line 239: warning: comment on exported method DateDayShard.FindForKey should be of the form "FindForKey ..." (golint)
    • Line 277: 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 284: warning: exported type DefaultShard should have comment or be unexported (golint)
    • Line 287: warning: exported method DefaultShard.FindForKey should have comment or be unexported (golint)
    • kingshard/mysql/resultset_sort.go
    • Line 26: warning: exported const SortAsc should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type SortKey should have comment or be unexported (golint)
    • Line 147: warning: exported method Resultset.Sort should have comment or be unexported (golint)
    • kingshard/proxy/server/conn.go
    • Line 31: warning: comment on exported type ClientConn should be of the form "ClientConn ..." (with optional leading article) (golint)
    • Line 71: warning: exported var DEFAULT_CAPABILITY should have comment or be unexported (golint)
    • Line 77: warning: exported method ClientConn.IsAllowConnect should have comment or be unexported (golint)
    • Line 100: warning: exported method ClientConn.Handshake should have comment or be unexported (golint)
    • Line 125: warning: exported method ClientConn.Close should have comment or be unexported (golint)
    • Line 276: warning: exported method ClientConn.Run should have comment or be unexported (golint)
    • kingshard/proxy/server/counter.go
    • Line 21: warning: exported type Counter should have comment or be unexported (golint)
    • Line 32: warning: exported method Counter.IncrClientConns should have comment or be unexported (golint)
    • Line 36: warning: exported method Counter.DecrClientConns should have comment or be unexported (golint)
    • Line 40: warning: exported method Counter.IncrClientQPS should have comment or be unexported (golint)
    • Line 44: warning: exported method Counter.IncrErrLogTotal should have comment or be unexported (golint)
    • Line 48: warning: exported method Counter.IncrSlowLogTotal should have comment or be unexported (golint)
    • Line 52: warning: comment on exported method Counter.FlushCounter should be of the form "FlushCounter ..." (golint)
    • kingshard/core/hack/hack.go
    • Line 24: warning: comment on exported function String should be of the form "String ..." (golint)
    • Line 34: warning: comment on exported function Slice should be of the form "Slice ..." (golint)
    • Line 45: warning: exported function IsSqlSep should have comment or be unexported (golint)
    • Line 51: warning: exported function ArrayToString should have comment or be unexported (golint)
    • kingshard/web/server.go
    • Line 1: warning: package comment should be of the form "Package web ..." (golint)
    • Line 26: warning: exported type ApiServer should have comment or be unexported (golint)
    • Line 35: warning: exported function NewApiServer should have comment or be unexported (golint)
    • Line 51: warning: exported method ApiServer.Run should have comment or be unexported (golint)
    • Line 68: warning: exported method ApiServer.RegisterMiddleware should have comment or be unexported (golint)
    • Line 81: warning: exported method ApiServer.RegisterURL should have comment or be unexported (golint)
    • Line 110: warning: exported method ApiServer.CheckAuth should have comment or be unexported (golint)
    • kingshard/mysql/field.go
    • Line 21: warning: exported type FieldData should have comment or be unexported (golint)
    • Line 23: warning: exported type Field should have comment or be unexported (golint)
    • Line 40: warning: exported method FieldData.Parse should have comment or be unexported (golint)
    • Line 134: warning: exported method Field.Dump should have comment or be unexported (golint)
    • kingshard/mysql/state.go
    • Line 18: warning: exported const DEFAULT_MYSQL_STATE should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported var MySQLState should have comment or be unexported (golint)

license0%

Checks whether your project has a LICENSE file.


ineffassign85%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words