Preparing report...

Report for github.com/oikomi/FishChatServer2

A+    Excellent!    Found 114 issues across 145 files

Tweet

gofmt99%

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!


gocyclo97%

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.


golint24%

Golint is a linter for Go source code.

    • FishChatServer2/common/dao/kafka/kafka.go
    • Line 19: warning: exported var ErrProducer should have comment or be unexported (golint)
    • Line 23: warning: exported type Producer should have comment or be unexported (golint)
    • Line 63: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 88: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 151: warning: exported method Producer.Close should have comment or be unexported (golint)
    • Line 163: warning: comment on exported type Consumer should be of the form "Consumer ..." (with optional leading article) (golint)
    • Line 169: warning: exported function NewConsumer should have comment or be unexported (golint)
    • Line 200: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 207: warning: exported method Consumer.Close should have comment or be unexported (golint)
    • FishChatServer2/libnet/manager.go
    • Line 7: warning: exported type Manager should have comment or be unexported (golint)
    • Line 19: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 27: warning: exported method Manager.Dispose should have comment or be unexported (golint)
    • Line 42: warning: exported method Manager.NewSession should have comment or be unexported (golint)
    • Line 48: warning: exported method Manager.GetSession should have comment or be unexported (golint)
    • FishChatServer2/trash/msg_job/conf/conf.go
    • Line 11: warning: exported var Conf should have comment or be unexported (golint)
    • Line 14: warning: exported type Config should have comment or be unexported (golint)
    • Line 22: warning: exported type RPCClient should have comment or be unexported (golint)
    • Line 26: warning: exported type MongoDB should have comment or be unexported (golint)
    • Line 35: warning: exported function Init should have comment or be unexported (golint)
    • FishChatServer2/server/register/dao/redis.go
    • Line 32: warning: exported method Dao.Token should have comment or be unexported (golint)
    • Line 42: warning: exported method Dao.SetToken should have comment or be unexported (golint)
    • Line 52: warning: exported method Dao.RegisterAccess should have comment or be unexported (golint)
    • Line 62: warning: exported method Dao.RouterAccess should have comment or be unexported (golint)
    • Line 72: warning: exported method Dao.GetOnline should have comment or be unexported (golint)
    • Line 83: warning: exported method Dao.SetOnline should have comment or be unexported (golint)
    • FishChatServer2/protocol/external/cmd.go
    • Line 4: warning: comment on exported const ErrServerCMD should be of the form "ErrServerCMD ..." (golint)
    • Line 7: warning: comment on exported const ReqAccessServerCMD should be of the form "ReqAccessServerCMD ..." (golint)
    • Line 11: warning: comment on exported const LoginCMD should be of the form "LoginCMD ..." (golint)
    • Line 13: warning: exported const PingCMD should have comment (or a comment on this block) or be unexported (golint)
    • FishChatServer2/common/ecode/common.go
    • Line 4: warning: comment on exported const RequestErr should be of the form "RequestErr ..." (golint)
    • Line 7: warning: comment on exported const OK should be of the form "OK ..." (golint)
    • Line 9: warning: comment on exported const ServerErr should be of the form "ServerErr ..." (golint)
    • Line 12: warning: comment on exported const NoAccessServer should be of the form "NoAccessServer ..." (golint)
    • Line 15: warning: comment on exported const NoToken should be of the form "NoToken ..." (golint)
    • Line 17: warning: exported const CalcTokenFailed should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: comment on exported const UserIsAlreadyExist should be of the form "UserIsAlreadyExist ..." (golint)
    • Line 22: warning: comment on exported const NoData should be of the form "NoData ..." (golint)
    • FishChatServer2/server/manager/conf/conf.go
    • Line 12: warning: exported var Conf should have comment or be unexported (golint)
    • Line 15: warning: exported type Config should have comment or be unexported (golint)
    • Line 25: warning: exported type Redis should have comment or be unexported (golint)
    • Line 30: warning: exported type Mysql should have comment or be unexported (golint)
    • Line 34: warning: exported type HBase should have comment or be unexported (golint)
    • Line 45: warning: exported function Init should have comment or be unexported (golint)
    • FishChatServer2/server/logic/rpc/rpc_server.go
    • Line 16: warning: exported type RPCServer should have comment or be unexported (golint)
    • Line 21: warning: exported method RPCServer.Login should have comment or be unexported (golint)
    • Line 48: warning: exported method RPCServer.Ping should have comment or be unexported (golint)
    • Line 76: warning: exported method RPCServer.SendP2PMsg should have comment or be unexported (golint)
    • Line 131: warning: exported method RPCServer.AcceptP2PMsgAck should have comment or be unexported (golint)
    • Line 170: warning: exported method RPCServer.SendGroupMsg should have comment or be unexported (golint)
    • Line 199: warning: exported method RPCServer.SyncMsg should have comment or be unexported (golint)
    • Line 225: warning: exported function RPCServerInit should have comment or be unexported (golint)
    • FishChatServer2/libnet/server.go
    • Line 10: warning: exported type Server should have comment or be unexported (golint)
    • Line 17: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 26: warning: exported method Server.Listener should have comment or be unexported (golint)
    • Line 30: warning: exported method Server.Accept should have comment or be unexported (golint)
    • Line 59: warning: exported method Server.Stop should have comment or be unexported (golint)
    • FishChatServer2/trash/msg_job/dao/mongodb.go
    • Line 10: warning: exported type MongoDB should have comment or be unexported (golint)
    • Line 14: warning: exported function NewMongoDB should have comment or be unexported (golint)
    • Line 25: warning: exported method MongoDB.StoreOfflineMsg should have comment or be unexported (golint)
    • FishChatServer2/codec/reader.go
    • Line 9: warning: exported type Reader should have comment or be unexported (golint)
    • Line 15: warning: exported function NewReader should have comment or be unexported (golint)
    • Line 19: warning: exported method Reader.Reset should have comment or be unexported (golint)
    • Line 36: warning: exported method Reader.ReadPacket should have comment or be unexported (golint)
    • Line 44: warning: exported method Reader.ReadBytes should have comment or be unexported (golint)
    • Line 50: warning: exported method Reader.ReadString should have comment or be unexported (golint)
    • Line 54: warning: exported method Reader.ReadUvarint should have comment or be unexported (golint)
    • Line 61: warning: exported method Reader.ReadVarint should have comment or be unexported (golint)
    • Line 79: warning: exported method Reader.ReadByte should have comment or be unexported (golint)
    • Line 86: warning: exported method Reader.ReadUint8 should have comment or be unexported (golint)
    • Line 90: warning: exported method Reader.ReadUint16BE should have comment or be unexported (golint)
    • Line 94: warning: exported method Reader.ReadUint16LE should have comment or be unexported (golint)
    • Line 98: warning: exported method Reader.ReadUint24BE should have comment or be unexported (golint)
    • Line 102: warning: exported method Reader.ReadUint24LE should have comment or be unexported (golint)
    • Line 106: warning: exported method Reader.ReadUint32BE should have comment or be unexported (golint)
    • Line 110: warning: exported method Reader.ReadUint32LE should have comment or be unexported (golint)
    • Line 114: warning: exported method Reader.ReadUint40BE should have comment or be unexported (golint)
    • Line 118: warning: exported method Reader.ReadUint40LE should have comment or be unexported (golint)
    • Line 122: warning: exported method Reader.ReadUint48BE should have comment or be unexported (golint)
    • Line 126: warning: exported method Reader.ReadUint48LE should have comment or be unexported (golint)
    • Line 130: warning: exported method Reader.ReadUint56BE should have comment or be unexported (golint)
    • Line 134: warning: exported method Reader.ReadUint56LE should have comment or be unexported (golint)
    • Line 138: warning: exported method Reader.ReadUint64BE should have comment or be unexported (golint)
    • Line 142: warning: exported method Reader.ReadUint64LE should have comment or be unexported (golint)
    • Line 146: warning: exported method Reader.ReadFloat32BE should have comment or be unexported (golint)
    • Line 150: warning: exported method Reader.ReadFloat32LE should have comment or be unexported (golint)
    • Line 154: warning: exported method Reader.ReadFloat64BE should have comment or be unexported (golint)
    • Line 158: warning: exported method Reader.ReadFloat64LE should have comment or be unexported (golint)
    • Line 162: warning: exported method Reader.ReadInt8 should have comment or be unexported (golint)
    • Line 163: warning: exported method Reader.ReadInt16BE should have comment or be unexported (golint)
    • Line 164: warning: exported method Reader.ReadInt16LE should have comment or be unexported (golint)
    • Line 165: warning: exported method Reader.ReadInt24BE should have comment or be unexported (golint)
    • Line 166: warning: exported method Reader.ReadInt24LE should have comment or be unexported (golint)
    • Line 167: warning: exported method Reader.ReadInt32BE should have comment or be unexported (golint)
    • Line 168: warning: exported method Reader.ReadInt32LE should have comment or be unexported (golint)
    • Line 169: warning: exported method Reader.ReadInt40BE should have comment or be unexported (golint)
    • Line 170: warning: exported method Reader.ReadInt40LE should have comment or be unexported (golint)
    • Line 171: warning: exported method Reader.ReadInt48BE should have comment or be unexported (golint)
    • Line 172: warning: exported method Reader.ReadInt48LE should have comment or be unexported (golint)
    • Line 173: warning: exported method Reader.ReadInt56BE should have comment or be unexported (golint)
    • Line 174: warning: exported method Reader.ReadInt56LE should have comment or be unexported (golint)
    • Line 175: warning: exported method Reader.ReadInt64BE should have comment or be unexported (golint)
    • Line 176: warning: exported method Reader.ReadInt64LE should have comment or be unexported (golint)
    • Line 177: warning: exported method Reader.ReadIntBE should have comment or be unexported (golint)
    • Line 178: warning: exported method Reader.ReadIntLE should have comment or be unexported (golint)
    • Line 179: warning: exported method Reader.ReadUintBE should have comment or be unexported (golint)
    • Line 180: warning: exported method Reader.ReadUintLE should have comment or be unexported (golint)
    • FishChatServer2/server/access/server/server.go
    • Line 15: warning: exported type Server should have comment or be unexported (golint)
    • Line 20: warning: exported function New should have comment or be unexported (golint)
    • Line 52: warning: exported method Server.Loop should have comment or be unexported (golint)
    • Line 64: warning: exported method Server.SDHeart should have comment or be unexported (golint)
    • FishChatServer2/server/register/dao/mysql.go
    • Line 21: warning: exported type Mysql should have comment or be unexported (golint)
    • Line 31: warning: exported function NewMysql should have comment or be unexported (golint)
    • Line 48: warning: exported method Mysql.GetUser should have comment or be unexported (golint)
    • Line 66: warning: exported method Mysql.InsertUser should have comment or be unexported (golint)
    • Line 75: warning: exported method Mysql.InsertGroup should have comment or be unexported (golint)
    • Line 84: warning: exported method Mysql.InsertUserMsgID should have comment or be unexported (golint)
    • Line 93: warning: exported method Mysql.InsertUserGroup should have comment or be unexported (golint)
    • Line 102: warning: exported method Mysql.GetUsersByGroupID should have comment or be unexported (golint)
    • FishChatServer2/common/xtime/xtime.go
    • Line 12: warning: exported method Time.Scan should have comment or be unexported (golint)
    • Line 24: warning: exported method Time.Value should have comment or be unexported (golint)
    • Line 28: warning: exported method Time.Time should have comment or be unexported (golint)
    • Line 35: warning: exported method Duration.UnmarshalText should have comment or be unexported (golint)
    • FishChatServer2/libnet/session.go
    • Line 10: warning: error var SessionClosedError should have name of the form ErrFoo (golint)
    • Line 10: warning: exported var SessionClosedError should have comment or be unexported (golint)
    • Line 11: warning: error var SessionBlockedError should have name of the form ErrFoo (golint)
    • Line 11: warning: exported var SessionBlockedError should have comment or be unexported (golint)
    • Line 15: warning: exported type Session should have comment or be unexported (golint)
    • Line 27: warning: exported function NewSession should have comment or be unexported (golint)
    • Line 45: warning: exported method Session.ID should have comment or be unexported (golint)
    • Line 49: warning: exported method Session.IsClosed should have comment or be unexported (golint)
    • Line 53: warning: exported method Session.Close should have comment or be unexported (golint)
    • Line 66: warning: exported method Session.Codec should have comment or be unexported (golint)
    • Line 70: warning: exported method Session.Receive should have comment or be unexported (golint)
    • Line 92: warning: exported method Session.Send should have comment or be unexported (golint)
    • FishChatServer2/server/notify/dao/redis.go
    • Line 32: warning: exported method Dao.Token should have comment or be unexported (golint)
    • Line 42: warning: exported method Dao.SetToken should have comment or be unexported (golint)
    • Line 52: warning: exported method Dao.RegisterAccess should have comment or be unexported (golint)
    • Line 62: warning: exported method Dao.RouterAccess should have comment or be unexported (golint)
    • Line 72: warning: exported method Dao.GetOnline should have comment or be unexported (golint)
    • Line 83: warning: exported method Dao.SetOnline should have comment or be unexported (golint)
    • FishChatServer2/codec/binary.go
    • Line 10: warning: exported const MaxVarintLen16 should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported function GetUint16LE should have comment or be unexported (golint)
    • Line 19: warning: exported function PutUint16LE should have comment or be unexported (golint)
    • Line 23: warning: exported function GetUint16BE should have comment or be unexported (golint)
    • Line 27: warning: exported function PutUint16BE should have comment or be unexported (golint)
    • Line 31: warning: exported function GetUint24LE should have comment or be unexported (golint)
    • Line 35: warning: exported function PutUint24LE should have comment or be unexported (golint)
    • Line 41: warning: exported function GetUint24BE should have comment or be unexported (golint)
    • Line 45: warning: exported function PutUint24BE should have comment or be unexported (golint)
    • Line 51: warning: exported function GetUint32LE should have comment or be unexported (golint)
    • Line 55: warning: exported function PutUint32LE should have comment or be unexported (golint)
    • Line 59: warning: exported function GetUint32BE should have comment or be unexported (golint)
    • Line 63: warning: exported function PutUint32BE should have comment or be unexported (golint)
    • Line 67: warning: exported function GetUint40LE should have comment or be unexported (golint)
    • Line 71: warning: exported function PutUint40LE should have comment or be unexported (golint)
    • Line 79: warning: exported function GetUint40BE should have comment or be unexported (golint)
    • Line 83: warning: exported function PutUint40BE should have comment or be unexported (golint)
    • Line 91: warning: exported function GetUint48LE should have comment or be unexported (golint)
    • Line 95: warning: exported function PutUint48LE should have comment or be unexported (golint)
    • Line 104: warning: exported function GetUint48BE should have comment or be unexported (golint)
    • Line 108: warning: exported function PutUint48BE should have comment or be unexported (golint)
    • Line 117: warning: exported function GetUint56LE should have comment or be unexported (golint)
    • Line 121: warning: exported function PutUint56LE should have comment or be unexported (golint)
    • Line 131: warning: exported function GetUint56BE should have comment or be unexported (golint)
    • Line 135: warning: exported function PutUint56BE should have comment or be unexported (golint)
    • Line 145: warning: exported function GetUint64LE should have comment or be unexported (golint)
    • Line 149: warning: exported function PutUint64LE should have comment or be unexported (golint)
    • Line 153: warning: exported function GetUint64BE should have comment or be unexported (golint)
    • Line 157: warning: exported function PutUint64BE should have comment or be unexported (golint)
    • Line 161: warning: exported function GetFloat32BE should have comment or be unexported (golint)
    • Line 165: warning: exported function PutFloat32BE should have comment or be unexported (golint)
    • Line 169: warning: exported function GetFloat32LE should have comment or be unexported (golint)
    • Line 173: warning: exported function PutFloat32LE should have comment or be unexported (golint)
    • Line 177: warning: exported function GetFloat64BE should have comment or be unexported (golint)
    • Line 181: warning: exported function PutFloat64BE should have comment or be unexported (golint)
    • Line 185: warning: exported function GetFloat64LE should have comment or be unexported (golint)
    • Line 189: warning: exported function PutFloat64LE should have comment or be unexported (golint)
    • Line 193: warning: exported function UvarintSize should have comment or be unexported (golint)
    • Line 202: warning: exported function VarintSize should have comment or be unexported (golint)
    • Line 210: warning: exported function GetUvarint should have comment or be unexported (golint)
    • Line 214: warning: exported function PutUvarint should have comment or be unexported (golint)
    • Line 218: warning: exported function GetVarint should have comment or be unexported (golint)
    • Line 222: warning: exported function PutVarint should have comment or be unexported (golint)
    • Line 226: warning: exported function ReadUvarint should have comment or be unexported (golint)
    • Line 230: warning: exported function ReadVarint should have comment or be unexported (golint)
    • FishChatServer2/server/logic/dao/kafka.go
    • Line 13: warning: exported type KafkaProducer should have comment or be unexported (golint)
    • Line 19: warning: exported function NewKafkaProducer should have comment or be unexported (golint)
    • Line 29: warning: exported method KafkaProducer.SendP2PMsg should have comment or be unexported (golint)
    • Line 33: warning: exported method KafkaProducer.SendGroupMsg should have comment or be unexported (golint)
    • Line 37: warning: exported method KafkaProducer.HandleSuccess should have comment or be unexported (golint)
    • Line 49: warning: exported method KafkaProducer.HandleError should have comment or be unexported (golint)
    • Line 61: warning: exported method KafkaProducer.Process should have comment or be unexported (golint)
    • FishChatServer2/trash/msg_job/rpc/client/access_server.go
    • Line 13: warning: exported type AccessServerRPCCli should have comment or be unexported (golint)
    • Line 17: warning: exported function NewAccessServerRPCCli should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method AccessServerRPCCli.SendP2PMsgFromJob should be of the form "SendP2PMsgFromJob ..." (golint)
    • FishChatServer2/service/idgen/rpc/rpc_server.go
    • Line 20: warning: exported type RPCServer should have comment or be unexported (golint)
    • Line 27: warning: exported const PATH should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported const TS_MASK should have comment (or a comment on this block) or be unexported (golint)
    • Line 80: warning: comment on exported method RPCServer.Next should be of the form "Next ..." (golint)
    • Line 119: warning: comment on exported method RPCServer.GetUUID should be of the form "GetUUID ..." (golint)
    • Line 129: warning: don't use underscores in Go names; var last_ts should be lastTs (golint)
    • Line 161: warning: don't use underscores in Go names; method wait_ms should be waitMs (golint)
    • Line 161: warning: don't use underscores in Go names; method parameter last_ts should be lastTs (golint)
    • Line 170: warning: don't use underscores in Go names; func cas_delay should be casDelay (golint)
    • Line 179: warning: exported function RPCServerInit should have comment or be unexported (golint)
    • FishChatServer2/codec/writer.go
    • Line 7: warning: exported type Writer should have comment or be unexported (golint)
    • Line 13: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 17: warning: exported method Writer.Reset should have comment or be unexported (golint)
    • Line 32: warning: exported method Writer.WritePacket should have comment or be unexported (golint)
    • Line 39: warning: exported method Writer.WriteBytes should have comment or be unexported (golint)
    • Line 43: warning: exported method Writer.WriteString should have comment or be unexported (golint)
    • Line 47: warning: exported method Writer.WriteUvarint should have comment or be unexported (golint)
    • Line 51: warning: exported method Writer.WriteVarint should have comment or be unexported (golint)
    • Line 55: warning: exported method Writer.WriteUint8 should have comment or be unexported (golint)
    • Line 60: warning: exported method Writer.WriteUint16BE should have comment or be unexported (golint)
    • Line 65: warning: exported method Writer.WriteUint16LE should have comment or be unexported (golint)
    • Line 70: warning: exported method Writer.WriteUint24BE should have comment or be unexported (golint)
    • Line 75: warning: exported method Writer.WriteUint24LE should have comment or be unexported (golint)
    • Line 81: warning: exported method Writer.WriteUint32BE should have comment or be unexported (golint)
    • Line 86: warning: exported method Writer.WriteUint32LE should have comment or be unexported (golint)
    • Line 91: warning: exported method Writer.WriteUint40BE should have comment or be unexported (golint)
    • Line 96: warning: exported method Writer.WriteUint40LE should have comment or be unexported (golint)
    • Line 101: warning: exported method Writer.WriteUint48BE should have comment or be unexported (golint)
    • Line 106: warning: exported method Writer.WriteUint48LE should have comment or be unexported (golint)
    • Line 111: warning: exported method Writer.WriteUint56BE should have comment or be unexported (golint)
    • Line 116: warning: exported method Writer.WriteUint56LE should have comment or be unexported (golint)
    • Line 121: warning: exported method Writer.WriteUint64BE should have comment or be unexported (golint)
    • Line 126: warning: exported method Writer.WriteUint64LE should have comment or be unexported (golint)
    • Line 131: warning: exported method Writer.WriteFloat32BE should have comment or be unexported (golint)
    • Line 136: warning: exported method Writer.WriteFloat32LE should have comment or be unexported (golint)
    • Line 141: warning: exported method Writer.WriteFloat64BE should have comment or be unexported (golint)
    • Line 146: warning: exported method Writer.WriteFloat64LE should have comment or be unexported (golint)
    • Line 151: warning: exported method Writer.WriteInt8 should have comment or be unexported (golint)
    • Line 152: warning: exported method Writer.WriteInt16BE should have comment or be unexported (golint)
    • Line 153: warning: exported method Writer.WriteInt16LE should have comment or be unexported (golint)
    • Line 154: warning: exported method Writer.WriteInt24BE should have comment or be unexported (golint)
    • Line 155: warning: exported method Writer.WriteInt24LE should have comment or be unexported (golint)
    • Line 156: warning: exported method Writer.WriteInt32BE should have comment or be unexported (golint)
    • Line 157: warning: exported method Writer.WriteInt32LE should have comment or be unexported (golint)
    • Line 158: warning: exported method Writer.WriteInt40BE should have comment or be unexported (golint)
    • Line 159: warning: exported method Writer.WriteInt40LE should have comment or be unexported (golint)
    • Line 160: warning: exported method Writer.WriteInt48BE should have comment or be unexported (golint)
    • Line 161: warning: exported method Writer.WriteInt48LE should have comment or be unexported (golint)
    • Line 162: warning: exported method Writer.WriteInt56BE should have comment or be unexported (golint)
    • Line 163: warning: exported method Writer.WriteInt56LE should have comment or be unexported (golint)
    • Line 164: warning: exported method Writer.WriteInt64BE should have comment or be unexported (golint)
    • Line 165: warning: exported method Writer.WriteInt64LE should have comment or be unexported (golint)
    • Line 166: warning: exported method Writer.WriteIntBE should have comment or be unexported (golint)
    • Line 167: warning: exported method Writer.WriteIntLE should have comment or be unexported (golint)
    • Line 168: warning: exported method Writer.WriteUintBE should have comment or be unexported (golint)
    • Line 169: warning: exported method Writer.WriteUintLE should have comment or be unexported (golint)
    • FishChatServer2/http_server/user-api/service/service.go
    • Line 10: warning: exported type Service should have comment or be unexported (golint)
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 26: warning: exported method Service.Auth should have comment or be unexported (golint)
    • Line 42: warning: exported method Service.Register should have comment or be unexported (golint)
    • FishChatServer2/server/logic/rpc/client/manager.go
    • Line 12: warning: exported type ManagerRPCCli should have comment or be unexported (golint)
    • Line 16: warning: exported function NewManagerRPCCli should have comment or be unexported (golint)
    • Line 30: warning: exported method ManagerRPCCli.SetExceptionMsg should have comment or be unexported (golint)
    • Line 38: warning: exported method ManagerRPCCli.SyncMsg should have comment or be unexported (golint)
    • FishChatServer2/server/notify/dao/mysql.go
    • Line 17: warning: exported type Mysql should have comment or be unexported (golint)
    • Line 23: warning: exported function NewMysql should have comment or be unexported (golint)
    • Line 36: warning: exported method Mysql.UpdateUserMsgID should have comment or be unexported (golint)
    • Line 45: warning: exported method Mysql.GetUserMsgID should have comment or be unexported (golint)
    • FishChatServer2/server/register/conf/conf.go
    • Line 12: warning: exported var Conf should have comment or be unexported (golint)
    • Line 15: warning: exported type Config should have comment or be unexported (golint)
    • Line 27: warning: exported type RPCClient should have comment or be unexported (golint)
    • Line 31: warning: exported type Auth should have comment or be unexported (golint)
    • Line 36: warning: exported type Redis should have comment or be unexported (golint)
    • Line 41: warning: exported type Mysql should have comment or be unexported (golint)
    • Line 45: warning: exported type MongoDB should have comment or be unexported (golint)
    • Line 54: warning: exported function Init should have comment or be unexported (golint)
    • FishChatServer2/server/logic/conf/conf.go
    • Line 11: warning: exported var Conf should have comment or be unexported (golint)
    • Line 14: warning: exported type Config should have comment or be unexported (golint)
    • Line 25: warning: exported type KafkaProducer should have comment or be unexported (golint)
    • Line 31: warning: exported type RPCClient should have comment or be unexported (golint)
    • Line 52: warning: exported function Init should have comment or be unexported (golint)
    • FishChatServer2/server/notify/conf/conf.go
    • Line 12: warning: exported var Conf should have comment or be unexported (golint)
    • Line 15: warning: exported type Config should have comment or be unexported (golint)
    • Line 26: warning: exported type RPCClient should have comment or be unexported (golint)
    • Line 30: warning: exported type Redis should have comment or be unexported (golint)
    • Line 35: warning: exported type Mysql should have comment or be unexported (golint)
    • Line 48: warning: exported function Init should have comment or be unexported (golint)
    • FishChatServer2/server/access/conf/conf.go
    • Line 11: warning: exported var Conf should have comment or be unexported (golint)
    • Line 14: warning: exported type Config should have comment or be unexported (golint)
    • Line 25: warning: exported type RPCClient should have comment or be unexported (golint)
    • Line 29: warning: exported type ConfDiscovery should have comment or be unexported (golint)
    • Line 40: warning: exported function Init should have comment or be unexported (golint)
    • FishChatServer2/http_server/user-api/conf/conf.go
    • Line 12: warning: exported var Conf should have comment or be unexported (golint)
    • Line 15: warning: exported type Config should have comment or be unexported (golint)
    • Line 22: warning: exported type RPCClient should have comment or be unexported (golint)
    • Line 26: warning: exported type Redis should have comment or be unexported (golint)
    • Line 35: warning: exported function Init should have comment or be unexported (golint)
    • FishChatServer2/conf_discovery/etcd/work.go
    • Line 12: warning: exported type Worker should have comment or be unexported (golint)
    • Line 19: warning: comment on exported type WorkerInfo should be of the form "WorkerInfo ..." (with optional leading article) (golint)
    • Line 26: warning: exported function NewWorker should have comment or be unexported (golint)
    • Line 44: warning: exported method Worker.HeartBeat should have comment or be unexported (golint)
    • FishChatServer2/common/model/kafka.go
    • Line 4: warning: exported const SendP2PMsgKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: exported type SendP2PMsgKafka should have comment or be unexported (golint)
    • Line 19: warning: exported type SendGroupMsgKafka should have comment or be unexported (golint)
    • FishChatServer2/http_server/group-api/service/service.go
    • Line 10: warning: exported type Service should have comment or be unexported (golint)
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 26: warning: exported method Service.CreateGroup should have comment or be unexported (golint)
    • Line 38: warning: exported method Service.JoinGroup should have comment or be unexported (golint)
    • Line 50: warning: exported method Service.QuitGroup should have comment or be unexported (golint)
    • FishChatServer2/codec/protobuf.go
    • Line 11: warning: exported type ProtobufProtocol should have comment or be unexported (golint)
    • Line 16: warning: exported function Protobuf should have comment or be unexported (golint)
    • Line 23: warning: exported method ProtobufProtocol.Register should have comment or be unexported (golint)
    • Line 33: warning: exported method ProtobufProtocol.RegisterName should have comment or be unexported (golint)
    • Line 42: warning: exported method ProtobufProtocol.NewCodec should have comment or be unexported (golint)
    • Line 42: warning: receiver name p should be consistent with previous receiver name j for ProtobufProtocol (golint)
    • FishChatServer2/http_server/group-api/rpc/client/register.go
    • Line 12: warning: exported type RegisterRPCCli should have comment or be unexported (golint)
    • Line 16: warning: exported function NewRegisterRPCCli should have comment or be unexported (golint)
    • Line 30: warning: exported method RegisterRPCCli.CreateGroup should have comment or be unexported (golint)
    • Line 38: warning: exported method RegisterRPCCli.JoinGroup should have comment or be unexported (golint)
    • Line 46: warning: exported method RegisterRPCCli.QuitGroup should have comment or be unexported (golint)
    • FishChatServer2/common/net/xhttp/router/router.go
    • Line 13: warning: exported type Identify should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • Line 131: 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)
    • FishChatServer2/server/notify/rpc/client/access.go
    • Line 13: warning: exported type AccessServerRPCCli should have comment or be unexported (golint)
    • Line 17: warning: exported function NewAccessServerRPCCli should have comment or be unexported (golint)
    • Line 67: warning: comment on exported method AccessServerRPCCli.SendNotify should be of the form "SendNotify ..." (golint)
    • FishChatServer2/http_server/group-api/conf/conf.go
    • Line 12: warning: exported var Conf should have comment or be unexported (golint)
    • Line 15: warning: exported type Config should have comment or be unexported (golint)
    • Line 22: warning: exported type RPCClient should have comment or be unexported (golint)
    • Line 26: warning: exported type Redis should have comment or be unexported (golint)
    • Line 35: warning: exported function Init should have comment or be unexported (golint)
    • FishChatServer2/trash/es_job/service/service.go
    • Line 22: warning: exported type Service should have comment or be unexported (golint)
    • Line 28: warning: exported function New should have comment or be unexported (golint)
    • Line 94: warning: exported method Service.Close should have comment or be unexported (golint)
    • Line 98: warning: exported method Service.Wait should have comment or be unexported (golint)
    • FishChatServer2/common/dao/xhbase/xhbase.go
    • Line 13: warning: exported type Client should have comment or be unexported (golint)
    • Line 18: warning: exported method Client.Scan should have comment or be unexported (golint)
    • Line 22: warning: exported method Client.Get should have comment or be unexported (golint)
    • Line 26: warning: exported method Client.Put should have comment or be unexported (golint)
    • Line 30: warning: exported method Client.Delete should have comment or be unexported (golint)
    • Line 34: warning: exported method Client.Append should have comment or be unexported (golint)
    • Line 38: warning: exported method Client.Increment should have comment or be unexported (golint)
    • Line 42: warning: exported method Client.Close should have comment or be unexported (golint)
    • Line 46: warning: exported function NewClient should have comment or be unexported (golint)
    • FishChatServer2/common/dao/xmysql/xmysql.go
    • Line 6: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 14: warning: exported var ErrStmtNil should have comment or be unexported (golint)
    • Line 17: warning: exported type DB should have comment or be unexported (golint)
    • Line 22: warning: exported type Tx should have comment or be unexported (golint)
    • Line 26: warning: exported type Stmt should have comment or be unexported (golint)
    • Line 33: warning: exported function NewMySQL should have comment or be unexported (golint)
    • Line 45: warning: exported function Open should have comment or be unexported (golint)
    • Line 53: warning: exported method DB.Exec should have comment or be unexported (golint)
    • Line 57: warning: exported method DB.Ping should have comment or be unexported (golint)
    • Line 61: warning: exported method DB.Prepare should have comment or be unexported (golint)
    • Line 69: warning: exported method DB.Prepared should have comment or be unexported (golint)
    • Line 90: warning: exported method DB.Query should have comment or be unexported (golint)
    • Line 94: warning: exported method DB.QueryRow should have comment or be unexported (golint)
    • Line 98: warning: exported method Stmt.Close should have comment or be unexported (golint)
    • Line 105: warning: exported method Stmt.Exec should have comment or be unexported (golint)
    • Line 112: warning: exported method Stmt.Query should have comment or be unexported (golint)
    • Line 119: warning: exported method Stmt.QueryRow should have comment or be unexported (golint)
    • Line 126: warning: exported method Tx.Commit should have comment or be unexported (golint)
    • Line 130: warning: exported method Tx.Rollback should have comment or be unexported (golint)
    • Line 134: warning: exported method Tx.Exec should have comment or be unexported (golint)
    • Line 138: warning: exported method Tx.Query should have comment or be unexported (golint)
    • Line 142: warning: exported method Tx.QueryRow should have comment or be unexported (golint)
    • Line 146: warning: exported method Tx.Stmt should have comment or be unexported (golint)
    • Line 151: warning: exported method Tx.Prepare should have comment or be unexported (golint)
    • FishChatServer2/http_server/msg-api/conf/conf.go
    • Line 12: warning: exported var Conf should have comment or be unexported (golint)
    • Line 15: warning: exported type Config should have comment or be unexported (golint)
    • Line 22: warning: exported type RPCClient should have comment or be unexported (golint)
    • Line 26: warning: exported type Redis should have comment or be unexported (golint)
    • Line 35: warning: exported function Init should have comment or be unexported (golint)
    • FishChatServer2/common/net/xweb/router.go
    • Line 14: warning: comment on exported type Router should be of the form "Router ..." (with optional leading article) (golint)
    • Line 29: warning: exported method Router.Group should have comment or be unexported (golint)
    • Line 33: warning: comment on exported method Router.Handle should be of the form "Handle ..." (golint)
    • Line 42: warning: exported method Router.HandlerFunc should have comment or be unexported (golint)
    • Line 57: warning: exported method Router.Post should have comment or be unexported (golint)
    • FishChatServer2/server/logic/rpc/client/register.go
    • Line 12: warning: exported type RegisterRPCCli should have comment or be unexported (golint)
    • Line 16: warning: exported function NewRegisterRPCCli should have comment or be unexported (golint)
    • Line 30: warning: exported method RegisterRPCCli.Login should have comment or be unexported (golint)
    • Line 38: warning: exported method RegisterRPCCli.Auth should have comment or be unexported (golint)
    • Line 46: warning: exported method RegisterRPCCli.Online should have comment or be unexported (golint)
    • Line 54: warning: exported method RegisterRPCCli.RouterAccess should have comment or be unexported (golint)
    • Line 62: warning: exported method RegisterRPCCli.Ping should have comment or be unexported (golint)
    • Line 70: warning: exported method RegisterRPCCli.GetUsersByGroupID should have comment or be unexported (golint)
    • FishChatServer2/server/register/rpc/rpc_server.go
    • Line 19: warning: exported type RPCServer should have comment or be unexported (golint)
    • Line 24: warning: exported method RPCServer.Register should have comment or be unexported (golint)
    • Line 61: warning: exported method RPCServer.Login should have comment or be unexported (golint)
    • Line 115: warning: exported method RPCServer.RouterAccess should have comment or be unexported (golint)
    • Line 134: warning: exported method RPCServer.Auth should have comment or be unexported (golint)
    • Line 157: warning: exported method RPCServer.GetUsersByGroupID should have comment or be unexported (golint)
    • Line 176: warning: exported method RPCServer.CreateGroup should have comment or be unexported (golint)
    • Line 198: warning: exported method RPCServer.JoinGroup should have comment or be unexported (golint)
    • Line 215: warning: exported method RPCServer.QuitGroup should have comment or be unexported (golint)
    • Line 219: warning: exported method RPCServer.Online should have comment or be unexported (golint)
    • Line 240: warning: exported method RPCServer.Ping should have comment or be unexported (golint)
    • Line 257: warning: exported function RPCServerInit should have comment or be unexported (golint)
    • FishChatServer2/server/manager/dao/mysql.go
    • Line 17: warning: exported type Mysql should have comment or be unexported (golint)
    • Line 23: warning: exported function NewMysql should have comment or be unexported (golint)
    • Line 36: warning: exported method Mysql.GetUserMsgID should have comment or be unexported (golint)
    • Line 50: warning: exported method Mysql.UpdateUserMsgID should have comment or be unexported (golint)
    • FishChatServer2/common/model/mongo.go
    • Line 7: warning: exported type ExceptionMsg should have comment or be unexported (golint)
    • Line 14: warning: exported type OfflineMsg should have comment or be unexported (golint)
    • Line 24: warning: exported type OfflineMsgs should have comment or be unexported (golint)
    • Line 28: warning: exported type Group should have comment or be unexported (golint)
    • FishChatServer2/conf_discovery/etcd/master.go
    • Line 27: warning: exported function NewMaster should have comment or be unexported (golint)
    • Line 45: warning: exported method Master.Members should have comment or be unexported (golint)
    • Line 65: warning: exported method Master.WatchWorkers should have comment or be unexported (golint)
    • FishChatServer2/http_server/user-api/rpc/client/register.go
    • Line 12: warning: exported type RegisterRPCCli should have comment or be unexported (golint)
    • Line 16: warning: exported function NewRegisterRPCCli should have comment or be unexported (golint)
    • Line 30: warning: exported method RegisterRPCCli.Register should have comment or be unexported (golint)
    • Line 38: warning: exported method RegisterRPCCli.Auth should have comment or be unexported (golint)
    • FishChatServer2/server/manager/rpc/rpc_server.go
    • Line 21: warning: exported type RPCServer should have comment or be unexported (golint)
    • Line 54: warning: exported method RPCServer.ExceptionMsg should have comment or be unexported (golint)
    • Line 59: warning: exported method RPCServer.SetExceptionMsg should have comment or be unexported (golint)
    • Line 91: warning: exported method RPCServer.Sync should have comment or be unexported (golint)
    • Line 162: warning: exported function RPCServerInit should have comment or be unexported (golint)
    • FishChatServer2/common/dao/xredis/xredis.go
    • Line 22: warning: exported type Pool should have comment or be unexported (golint)
    • Line 27: warning: exported function NewPool should have comment or be unexported (golint)
    • Line 46: warning: exported method Pool.Get should have comment or be unexported (golint)
    • Line 50: warning: exported method Pool.Close should have comment or be unexported (golint)
    • FishChatServer2/server/access/rpc/rpc_server.go
    • Line 16: warning: exported type RPCServer should have comment or be unexported (golint)
    • Line 19: warning: exported method RPCServer.SendP2PMsgFromJob should have comment or be unexported (golint)
    • Line 50: warning: exported method RPCServer.SendNotify should have comment or be unexported (golint)
    • Line 83: warning: exported function RPCServerInit should have comment or be unexported (golint)
    • FishChatServer2/codec/spliter.go
    • Line 7: warning: exported type HeadSpliter should have comment or be unexported (golint)
    • Line 32: warning: exported method HeadSpliter.Limit should have comment or be unexported (golint)
    • Line 38: warning: exported var SplitByUint16BE should have comment or be unexported (golint)
    • FishChatServer2/libnet/api.go
    • Line 9: warning: exported type Protocol should have comment or be unexported (golint)
    • Line 13: warning: exported type Codec should have comment or be unexported (golint)
    • Line 19: warning: exported function Serve should have comment or be unexported (golint)
    • Line 27: warning: exported function Connect should have comment or be unexported (golint)
    • Line 35: warning: exported function ConnectTimeout should have comment or be unexported (golint)
    • FishChatServer2/server/manager/dao/redis.go
    • Line 24: warning: exported type Redis should have comment or be unexported (golint)
    • Line 28: warning: exported function NewRedis should have comment or be unexported (golint)
    • Line 35: warning: exported method Redis.SetExceptionMsg should have comment or be unexported (golint)
    • Line 45: warning: exported method Redis.ExceptionMsg should have comment or be unexported (golint)
    • Line 55: warning: exported method Redis.SetNormalMsg should have comment or be unexported (golint)
    • FishChatServer2/server/access/rpc/client/logic.go
    • Line 12: warning: exported type LogicRPCCli should have comment or be unexported (golint)
    • Line 16: warning: exported function NewLogicRPCCli should have comment or be unexported (golint)
    • Line 30: warning: exported method LogicRPCCli.Login should have comment or be unexported (golint)
    • Line 38: warning: exported method LogicRPCCli.Ping should have comment or be unexported (golint)
    • Line 46: warning: exported method LogicRPCCli.SendP2PMsg should have comment or be unexported (golint)
    • Line 54: warning: exported method LogicRPCCli.AcceptP2PMsgAck should have comment or be unexported (golint)
    • Line 62: warning: exported method LogicRPCCli.SendGroupMsg should have comment or be unexported (golint)
    • Line 70: warning: exported method LogicRPCCli.SyncMsg should have comment or be unexported (golint)
    • FishChatServer2/common/conf/conf.go
    • Line 7: warning: exported type CommConf should have comment or be unexported (golint)
    • Line 12: warning: comment on exported type HTTPServer should be of the form "HTTPServer ..." (with optional leading article) (golint)
    • Line 29: warning: comment on exported type MultiHTTP should be of the form "MultiHTTP ..." (with optional leading article) (golint)
    • Line 36: warning: exported type Server should have comment or be unexported (golint)
    • Line 41: warning: exported type RPCServer should have comment or be unexported (golint)
    • Line 46: warning: exported type ConfDiscovery should have comment or be unexported (golint)
    • Line 51: warning: exported type ServiceDiscoveryServer should have comment or be unexported (golint)
    • Line 59: warning: exported type ServiceDiscoveryClient should have comment or be unexported (golint)
    • Line 65: warning: exported type Etcd should have comment or be unexported (golint)
    • Line 72: warning: exported type Zookeeper should have comment or be unexported (golint)
    • Line 106: warning: exported type MySQL should have comment or be unexported (golint)
    • Line 113: warning: exported type MongoDB should have comment or be unexported (golint)
    • Line 119: warning: exported type ES should have comment or be unexported (golint)
    • FishChatServer2/trash/msg_job/service/service.go
    • Line 19: warning: exported type Service should have comment or be unexported (golint)
    • Line 26: warning: exported function New should have comment or be unexported (golint)
    • Line 115: warning: exported method Service.Close should have comment or be unexported (golint)
    • Line 119: warning: exported method Service.Wait should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell97%

Misspell Finds commonly misspelled English words