Preparing report...

Report for github.com/daniel840829/Distributed-Golang-Game-Server

A    Great!    Found 27 issues across 34 files

Tweet

gofmt91%

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.


golint20%

Golint is a linter for Go source code.

    • Distributed-Golang-Game-Server/rpctest/invokeTest/main.go
    • Line 8: warning: exported type MyStruct should have comment or be unexported (golint)
    • Line 12: warning: exported type A should have comment or be unexported (golint)
    • Line 16: warning: exported type B should have comment or be unexported (golint)
    • Line 20: warning: exported method B.HI should have comment or be unexported (golint)
    • Line 24: warning: exported method MyStruct.Test should have comment or be unexported (golint)
    • Line 28: warning: exported method MyStruct.GetName should have comment or be unexported (golint)
    • Line 28: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Distributed-Golang-Game-Server/game/data/data.go
    • Line 10: warning: exported type Obj should have comment or be unexported (golint)
    • Line 18: warning: exported type Objs should have comment or be unexported (golint)
    • Line 20: warning: exported function ReadObjData should have comment or be unexported (golint)
    • Line 33: warning: exported var ObjData should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/session/room.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 6: warning: should not use dot imports (golint)
    • Line 13: warning: exported type ChatMessage should have comment or be unexported (golint)
    • Line 19: warning: exported type ChatRoom should have comment or be unexported (golint)
    • Line 27: warning: exported var RoomManager should have comment or be unexported (golint)
    • Line 84: warning: exported function NewRoom should have comment or be unexported (golint)
    • Line 96: warning: exported type Room should have comment or be unexported (golint)
    • Line 109: warning: exported method Room.GenerateStartFrame should have comment or be unexported (golint)
    • Line 113: warning: should omit 2nd value from range; this loop is equivalent to `for s := range ...` (golint)
    • Line 124: warning: exported function NewEntityState should have comment or be unexported (golint)
    • Line 139: warning: exported method Room.Run should have comment or be unexported (golint)
    • Line 142: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • Line 169: warning: should omit 2nd value from range; this loop is equivalent to `for s := range ...` (golint)
    • Line 175: warning: exported method Room.UpdateFrame should have comment or be unexported (golint)
    • Line 182: warning: exported method Room.HandleEntityDestory should have comment or be unexported (golint)
    • Line 193: warning: exported method Room.HandleInteraction should have comment or be unexported (golint)
    • Line 204: warning: exported method Room.HandleEntityState should have comment or be unexported (golint)
    • Line 210: warning: exported method Room.HandleNewEntity should have comment or be unexported (golint)
    • Line 216: warning: exported method Room.SyncGameFrame should have comment or be unexported (golint)
    • Line 218: warning: should omit 2nd value from range; this loop is equivalent to `for s := range ...` (golint)
    • Line 224: warning: exported method Room.WaitPlayerReconnect should have comment or be unexported (golint)
    • Line 228: warning: exported method Room.PlayerLeave should have comment or be unexported (golint)
    • Line 237: warning: exported function GetTimeStamp should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/agentToGame.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 22: warning: exported type ATGServer should have comment or be unexported (golint)
    • Line 25: warning: exported type CTGServer should have comment or be unexported (golint)
    • Line 28: warning: exported method CTGServer.TimeCalibrate should have comment or be unexported (golint)
    • Line 33: warning: exported method ATGServer.AquireGameRoom should have comment or be unexported (golint)
    • Line 38: warning: exported method ATGServer.DeletGameRoom should have comment or be unexported (golint)
    • Line 46: warning: exported method CTGServer.PlayerInput should have comment or be unexported (golint)
    • Line 66: warning: exported method CTGServer.UpdateGameFrame should have comment or be unexported (golint)
    • Line 93: warning: exported method CTGServer.Pipe should have comment or be unexported (golint)
    • Line 97: warning: exported function GetSesionFromContext should have comment or be unexported (golint)
    • Line 106: warning: exported function HandleRPCError should have comment or be unexported (golint)
    • Line 123: warning: exported function IgnoreError should have comment or be unexported (golint)
    • Line 127: warning: exported function RecordError should have comment or be unexported (golint)
    • Line 132: warning: exported function ReconnectError should have comment or be unexported (golint)
    • Line 138: warning: exported function EndConnection should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/timeCalibrate/timeCalibration.go
    • Line 1: warning: don't use MixedCaps in package name; timeCalibration should be timecalibration (golint)
    • Line 10: warning: exported type TimeCalibration should have comment or be unexported (golint)
    • Line 15: warning: exported method TimeCalibration.FromClientTimeDelay should have comment or be unexported (golint)
    • Line 19: warning: exported method TimeCalibration.ToClientTimeDelay should have comment or be unexported (golint)
    • Line 23: warning: exported type Proccess should have comment or be unexported (golint)
    • Line 29: warning: exported type StageInfo should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/entity/entity.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 25: warning: exported type Entity should have comment or be unexported (golint)
    • Line 38: warning: exported type IEntity should have comment or be unexported (golint)
    • Line 48: warning: exported method Entity.GetInfo should have comment or be unexported (golint)
    • Line 54: warning: exported method Entity.Hit should have comment or be unexported (golint)
    • Line 58: warning: exported method Entity.Harm should have comment or be unexported (golint)
    • Line 77: warning: exported method Entity.Init should have comment or be unexported (golint)
    • Line 94: warning: exported method Entity.Tick should have comment or be unexported (golint)
    • Line 96: warning: exported method Entity.Destroy should have comment or be unexported (golint)
    • Line 107: warning: exported method Entity.Run should have comment or be unexported (golint)
    • Line 109: warning: exported method Entity.PhysicUpdate should have comment or be unexported (golint)
    • Line 112: warning: exported method Entity.GetTransform should have comment or be unexported (golint)
    • Line 115: warning: exported method Entity.Move should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/service/ClientToAgent.go
    • Line 4: warning: should not use dot imports (golint)
    • Line 34: warning: exported function NewAgentRpc should have comment or be unexported (golint)
    • Line 39: warning: exported type Agent should have comment or be unexported (golint)
    • Line 43: warning: exported method Agent.Init should have comment or be unexported (golint)
    • Line 47: warning: exported method Agent.AquireSessionKey should have comment or be unexported (golint)
    • Line 51: warning: exported method Agent.AquireOtherAgent should have comment or be unexported (golint)
    • Line 57: warning: exported method Agent.Login should have comment or be unexported (golint)
    • Line 64: warning: exported method Agent.CreateAccount should have comment or be unexported (golint)
    • Line 68: warning: comment on exported method Agent.SetAccount should be of the form "SetAccount ..." (golint)
    • Line 72: warning: exported method Agent.SetCharacter should have comment or be unexported (golint)
    • Line 76: warning: comment on exported method Agent.AquireGameServer should be of the form "AquireGameServer ..." (golint)
    • Line 81: warning: comment on exported method Agent.UpdateHome should be of the form "UpdateHome ..." (golint)
    • Line 85: warning: exported method Agent.UpdateRoomList should have comment or be unexported (golint)
    • Line 88: warning: exported method Agent.UpdateUserList should have comment or be unexported (golint)
    • Line 92: warning: comment on exported method Agent.Pipe should be of the form "Pipe ..." (golint)
    • Line 96: warning: exported method Agent.CreateRoom should have comment or be unexported (golint)
    • Line 99: warning: exported method Agent.JoinRoom should have comment or be unexported (golint)
    • Line 102: warning: exported method Agent.RoomReady should have comment or be unexported (golint)
    • Line 106: warning: exported function GetSesionFromContext should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/main.go
    • Line 32: warning: exported var AgentPort should have comment or be unexported (golint)
    • Line 96: warning: exported function RunAgent should have comment or be unexported (golint)
    • Line 109: warning: exported function RunGame should have comment or be unexported (golint)
    • Line 120: warning: exported function RunAgentToGame should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/entity/attack.go
    • Line 4: warning: should not use dot imports (golint)
    • Line 7: warning: exported type AttackBehavier should have comment or be unexported (golint)
    • Line 12: warning: exported type AttackBase should have comment or be unexported (golint)
    • Line 19: warning: exported method AttackBase.Attack should have comment or be unexported (golint)
    • Line 23: warning: exported method AttackBase.AutoAttack should have comment or be unexported (golint)
    • Line 27: warning: exported function NewShootBehavier should have comment or be unexported (golint)
    • Line 38: warning: exported type ShootBehavier should have comment or be unexported (golint)
    • Line 42: warning: exported method ShootBehavier.Attack should have comment or be unexported (golint)
    • Line 46: warning: exported method ShootBehavier.AutoAttack should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/service/ClientToGame.go
    • Line 16: warning: exported type CTGServer should have comment or be unexported (golint)
    • Line 19: warning: exported method CTGServer.EnterRoom should have comment or be unexported (golint)
    • Line 23: warning: exported method CTGServer.LeaveRoom should have comment or be unexported (golint)
    • Line 27: warning: comment on exported method CTGServer.PlayerInput should be of the form "PlayerInput ..." (golint)
    • Line 32: warning: comment on exported method CTGServer.UpdateRoomPrepareView should be of the form "UpdateRoomPrepareView ..." (golint)
    • Line 36: warning: exported method CTGServer.UpdateGameFrame should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/entity/treasure.go
    • Line 3: warning: exported type Treasure should have comment or be unexported (golint)
    • Line 8: warning: exported method Treasure.Tick should have comment or be unexported (golint)
    • Line 12: warning: exported method Treasure.Disapear should have comment or be unexported (golint)
    • Line 19: warning: exported method Treasure.BeCollected should have comment or be unexported (golint)
    • Line 23: warning: exported method Treasure.BeAttracted should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/entity/enemy.go
    • Line 4: warning: should not use dot imports (golint)
    • Line 11: warning: exported type Enemy should have comment or be unexported (golint)
    • Line 16: warning: exported method Enemy.PhysicUpdate should have comment or be unexported (golint)
    • Line 20: warning: exported method Enemy.Tick should have comment or be unexported (golint)
    • Line 24: warning: exported method Enemy.FindTargetAndAttack should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/entity/gameManager.go
    • Line 4: warning: should not use dot imports (golint)
    • Line 6: warning: should not use dot imports (golint)
    • Line 15: warning: exported type GameManager should have comment or be unexported (golint)
    • Line 46: warning: exported method GameManager.Init should have comment or be unexported (golint)
    • Line 70: warning: exported method GameManager.Run should have comment or be unexported (golint)
    • Line 84: warning: exported method GameManager.Calibrate should have comment or be unexported (golint)
    • Line 85: warning: don't use underscores in Go names; var f_send should be fSend (golint)
    • Line 94: warning: exported method GameManager.RegistRoom should have comment or be unexported (golint)
    • Line 103: warning: exported method GameManager.DestroyEntity should have comment or be unexported (golint)
    • Line 107: warning: exported method GameManager.Call should have comment or be unexported (golint)
    • Line 139: warning: exported method GameManager.UserDisconnect should have comment or be unexported (golint)
    • Line 151: warning: exported method GameManager.Entity should have comment or be unexported (golint)
    • Line 172: warning: exported method GameManager.ErrorHandle should have comment or be unexported (golint)
    • Line 176: warning: exported method GameManager.SyncPos should have comment or be unexported (golint)
    • Line 189: warning: exported method GameManager.CreateNewRoom should have comment or be unexported (golint)
    • Line 219: warning: exported method GameManager.RegistEnitity should have comment or be unexported (golint)
    • Line 228: warning: exported method GameManager.CreatePlayer should have comment or be unexported (golint)
    • Line 249: warning: exported method GameManager.CreateEntity should have comment or be unexported (golint)
    • Line 268: warning: comment on exported method GameManager.GetRoomStatus should be of the form "GetRoomStatus ..." (golint)
    • Line 274: warning: exported method GameManager.EnterRoom should have comment or be unexported (golint)
    • Line 282: warning: exported method GameManager.GetAllRoomInfo should have comment or be unexported (golint)
    • Line 286: warning: exported method GameManager.LeaveRoom should have comment or be unexported (golint)
    • Line 288: warning: don't use underscores in Go names; var f_send should be fSend (golint)
    • Line 295: warning: exported method GameManager.GetLoginData should have comment or be unexported (golint)
    • Line 299: warning: exported method GameManager.ReadyRoom should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/entity/player.go
    • Line 4: warning: should not use dot imports (golint)
    • Line 6: warning: should not use dot imports (golint)
    • Line 12: warning: exported type Player should have comment or be unexported (golint)
    • Line 16: warning: exported method Player.Init should have comment or be unexported (golint)
    • Line 22: warning: exported method Player.Shoot should have comment or be unexported (golint)
    • Line 40: warning: exported method Player.PhysicUpdate should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/uuid/uuid.go
    • Line 9: warning: exported const GM_ID should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type UID should have comment or be unexported (golint)
    • Line 23: warning: exported method UID.RegisterWorker should have comment or be unexported (golint)
    • Line 37: warning: exported method UID.NewId should have comment or be unexported (golint)
    • Line 42: warning: exported method UID.ParseId should have comment or be unexported (golint)
    • Line 51: warning: exported var Uid should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/storage/storage.go
    • Line 16: warning: exported const MGO_DB_NAME should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: don't use underscores in Go names; const UserInfo_COLLECTION should be UserInfoCOLLECTION (golint)
    • Line 18: warning: don't use underscores in Go names; const RegistInput_COLLECTION should be RegistInputCOLLECTION (golint)
    • Line 27: warning: exported var MgoDb should have comment or be unexported (golint)
    • Line 33: warning: exported type Db should have comment or be unexported (golint)
    • Line 41: warning: exported type MongoDb should have comment or be unexported (golint)
    • Line 46: warning: exported type FileStore should have comment or be unexported (golint)
    • Line 51: warning: exported type MgoError should have comment or be unexported (golint)
    • Line 60: warning: exported function ReadMgoSettingFromEnv should have comment or be unexported (golint)
    • Line 66: warning: exported method MongoDb.Init should have comment or be unexported (golint)
    • Line 93: warning: exported method MongoDb.Save should have comment or be unexported (golint)
    • Line 101: warning: exported method MongoDb.Find should have comment or be unexported (golint)
    • Line 110: warning: exported method MongoDb.Update should have comment or be unexported (golint)
    • Line 123: warning: exported method MongoDb.Delete should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/session/session.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 15: warning: exported type MsgChannel should have comment or be unexported (golint)
    • Line 20: warning: exported method MsgChannel.Close should have comment or be unexported (golint)
    • Line 29: warning: exported function NewMsgChannel should have comment or be unexported (golint)
    • Line 36: warning: exported function NewMsgChannelManager should have comment or be unexported (golint)
    • Line 42: warning: exported type MsgChannelManager should have comment or be unexported (golint)
    • Line 46: warning: exported method MsgChannelManager.AddMsgChan should have comment or be unexported (golint)
    • Line 54: warning: exported method MsgChannelManager.GetMsgChan should have comment or be unexported (golint)
    • Line 58: warning: exported method MsgChannelManager.CloseMsgChan should have comment or be unexported (golint)
    • Line 113: warning: exported function NewSession should have comment or be unexported (golint)
    • Line 129: warning: exported type Session should have comment or be unexported (golint)
    • Line 144: warning: exported method Session.GetPlayerInfo should have comment or be unexported (golint)
    • Line 163: warning: exported method Session.SetState should have comment or be unexported (golint)
    • Line 163: warning: don't use underscores in Go names; method parameter state_index should be stateIndex (golint)
    • Line 167: warning: exported type SessionState should have comment or be unexported (golint)
    • Line 196: warning: exported method SessionStateBase.SetSession should have comment or be unexported (golint)
    • Line 204: warning: exported method SessionStateBase.End should have comment or be unexported (golint)
    • Line 212: warning: exported method SessionStateBase.StartGame should have comment or be unexported (golint)
    • Line 216: warning: exported method SessionStateBase.Reconnect should have comment or be unexported (golint)
    • Line 220: warning: exported method SessionStateBase.WaitReconnect should have comment or be unexported (golint)
    • Line 223: warning: exported method SessionStateBase.EndConnection should have comment or be unexported (golint)
    • Line 227: warning: exported method SessionStateBase.SetStateCode should have comment or be unexported (golint)
    • Line 230: warning: exported method SessionStateBase.GetStateCode should have comment or be unexported (golint)
    • Line 233: warning: exported method SessionStateBase.CreateSession should have comment or be unexported (golint)
    • Line 237: warning: exported method SessionStateBase.HandleInput should have comment or be unexported (golint)
    • Line 240: warning: exported method SessionStateBase.Login should have comment or be unexported (golint)
    • Line 243: warning: exported method SessionStateBase.Logout should have comment or be unexported (golint)
    • Line 246: warning: exported method SessionStateBase.Regist should have comment or be unexported (golint)
    • Line 249: warning: exported method SessionStateBase.CreateRoom should have comment or be unexported (golint)
    • Line 252: warning: exported method SessionStateBase.EnterRoom should have comment or be unexported (golint)
    • Line 255: warning: exported method SessionStateBase.DeleteRoom should have comment or be unexported (golint)
    • Line 258: warning: exported method SessionStateBase.ReadyRoom should have comment or be unexported (golint)
    • Line 261: warning: exported method SessionStateBase.LeaveRoom should have comment or be unexported (golint)
    • Line 264: warning: exported method SessionStateBase.StartRoom should have comment or be unexported (golint)
    • Line 267: warning: exported method SessionStateBase.SettingCharacter should have comment or be unexported (golint)
    • Line 270: warning: exported method SessionStateBase.SettingRoom should have comment or be unexported (golint)
    • Line 273: warning: exported method SessionStateBase.EndRoom should have comment or be unexported (golint)
    • Line 277: warning: exported method SessionStateBase.CancelReady should have comment or be unexported (golint)
    • Line 281: warning: exported type SessionStateBase should have comment or be unexported (golint)
    • Line 287: warning: exported type SessionStateGameOnStart should have comment or be unexported (golint)
    • Line 291: warning: exported method SessionStateGameOnStart.StartGame should have comment or be unexported (golint)
    • Line 298: warning: exported type SessionStatePlaying should have comment or be unexported (golint)
    • Line 302: warning: exported method SessionStatePlaying.HandleInput should have comment or be unexported (golint)
    • Line 309: warning: exported method SessionStatePlaying.WaitReconnect should have comment or be unexported (golint)
    • Line 313: warning: exported method SessionStatePlaying.EndConnection should have comment or be unexported (golint)
    • Line 319: warning: exported type SessionStateWaitingReconnection should have comment or be unexported (golint)
    • Line 323: warning: exported method SessionStateWaitingReconnection.Waiting should have comment or be unexported (golint)
    • Line 339: warning: exported method SessionStateWaitingReconnection.EndConnection should have comment or be unexported (golint)
    • Line 345: warning: exported method SessionStateWaitingReconnection.StartGame should have comment or be unexported (golint)
    • Line 350: warning: exported method SessionStateWaitingReconnection.Reconnect should have comment or be unexported (golint)
    • Line 356: warning: exported type SessionStateGameOver should have comment or be unexported (golint)
    • Line 360: warning: exported method SessionStateGameOver.End should have comment or be unexported (golint)
    • Line 375: warning: don't use underscores in Go names; method parameter state_code should be stateCode (golint)
    • Line 396: warning: exported var Manager should have comment or be unexported (golint)
    • Line 398: warning: exported var SessionStateFactory should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/physic/physic.go
    • Line 8: warning: should not use dot imports (golint)
    • Line 20: warning: don't use underscores in Go names; const Player_Bit should be PlayerBit (golint)
    • Line 21: warning: don't use underscores in Go names; const Enemy_Bit should be EnemyBit (golint)
    • Line 22: warning: don't use underscores in Go names; const Skill_Bit should be SkillBit (golint)
    • Line 23: warning: don't use underscores in Go names; const Terrain_Bit should be TerrainBit (golint)
    • Line 24: warning: don't use underscores in Go names; const Specified_Bit should be SpecifiedBit (golint)
    • Line 25: warning: don't use underscores in Go names; const AOE_Bit should be AOEBit (golint)
    • Line 26: warning: don't use underscores in Go names; const TREASURE_Bit should be TREASUREBit (golint)
    • Line 27: warning: don't use underscores in Go names; const TeamA_Bit should be TeamABit (golint)
    • Line 28: warning: don't use underscores in Go names; const TeamB_Bit should be TeamBBit (golint)
    • Line 29: warning: don't use underscores in Go names; const TeamC_Bit should be TeamCBit (golint)
    • Line 30: warning: don't use underscores in Go names; const TeamD_Bit should be TeamDBit (golint)
    • Line 34: warning: don't use underscores in Go names; const No_Team_Mode should be NoTeamMode (golint)
    • Line 34: warning: exported const No_Team_Mode should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: don't use underscores in Go names; const Team_Mode should be TeamMode (golint)
    • Line 38: warning: exported function SetBits should have comment or be unexported (golint)
    • Line 45: warning: exported function SetBitExcept should have comment or be unexported (golint)
    • Line 52: warning: exported function SetAllBits should have comment or be unexported (golint)
    • Line 56: warning: exported type World should have comment or be unexported (golint)
    • Line 66: warning: exported type WorldData should have comment or be unexported (golint)
    • Line 71: warning: exported method World.Init should have comment or be unexported (golint)
    • Line 85: warning: exported method World.Destroy should have comment or be unexported (golint)
    • Line 94: warning: exported method World.CreateTerrain should have comment or be unexported (golint)
    • Line 125: warning: exported type CollideCallback should have comment or be unexported (golint)
    • Line 127: warning: exported function GetCollideHandler should have comment or be unexported (golint)
    • Line 160: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 198: warning: exported method World.PhysicUpdate should have comment or be unexported (golint)
    • Line 206: warning: exported method World.GetAllTransform should have comment or be unexported (golint)
    • Line 224: warning: exported method World.GetTransform should have comment or be unexported (golint)
    • Line 239: warning: exported method World.AddObj should have comment or be unexported (golint)
    • Line 244: warning: exported method World.DeleteObj should have comment or be unexported (golint)
    • Line 247: warning: exported method World.CreateEntity should have comment or be unexported (golint)
    • Line 297: warning: exported method World.SetTranform should have comment or be unexported (golint)
    • Line 309: warning: exported method World.Move should have comment or be unexported (golint)
    • Line 323: warning: exported type Objs should have comment or be unexported (golint)
    • Line 327: warning: exported method Objs.Get should have comment or be unexported (golint)
    • Line 333: warning: exported type ObjData should have comment or be unexported (golint)
    • Line 340: warning: exported type Obj should have comment or be unexported (golint)
    • Line 353: warning: exported method Obj.CreateAOE should have comment or be unexported (golint)
    • Line 362: warning: exported method Obj.SyncAOEPos should have comment or be unexported (golint)
    • Line 367: warning: exported method Obj.InAOE should have comment or be unexported (golint)
    • Line 374: warning: exported method Obj.ClearAOE should have comment or be unexported (golint)
    • Line 377: warning: exported method Obj.AddGeom should have comment or be unexported (golint)
    • Line 382: warning: exported method Obj.AddBody should have comment or be unexported (golint)
    • Line 386: warning: exported method Obj.Collide should have comment or be unexported (golint)
    • Line 391: warning: exported method Obj.ResetCollide should have comment or be unexported (golint)
    • Line 396: warning: exported method Obj.LoopCollideObj should have comment or be unexported (golint)
    • Line 403: warning: exported method Obj.GetData should have comment or be unexported (golint)
    • Line 407: warning: exported method Obj.SetData should have comment or be unexported (golint)
    • Line 411: warning: exported method Obj.Destroy should have comment or be unexported (golint)
    • Line 433: warning: exported function EulerToQuaternion should have comment or be unexported (golint)
    • Line 455: warning: exported function Q_LinToOde should have comment or be unexported (golint)
    • Line 455: warning: don't use underscores in Go names; func Q_LinToOde should be QLinToOde (golint)
    • Line 460: warning: exported function V3_LinToOde should have comment or be unexported (golint)
    • Line 460: warning: don't use underscores in Go names; func V3_LinToOde should be V3LinToOde (golint)
    • Line 465: warning: exported function Q_OdeToLin should have comment or be unexported (golint)
    • Line 465: warning: don't use underscores in Go names; func Q_OdeToLin should be QOdeToLin (golint)
    • Line 474: warning: exported function V3_OdeToLin should have comment or be unexported (golint)
    • Line 474: warning: don't use underscores in Go names; func V3_OdeToLin should be V3OdeToLin (golint)
    • Line 483: warning: exported function V3_OdeToMsg should have comment or be unexported (golint)
    • Line 483: warning: don't use underscores in Go names; func V3_OdeToMsg should be V3OdeToMsg (golint)
    • Line 488: warning: exported function Q_OdeToMsg should have comment or be unexported (golint)
    • Line 488: warning: don't use underscores in Go names; func Q_OdeToMsg should be QOdeToMsg (golint)
    • Line 493: warning: exported function V3_MsgToOde should have comment or be unexported (golint)
    • Line 493: warning: don't use underscores in Go names; func V3_MsgToOde should be V3MsgToOde (golint)
    • Line 497: warning: exported function Q_MsgToOde should have comment or be unexported (golint)
    • Line 497: warning: don't use underscores in Go names; func Q_MsgToOde should be QMsgToOde (golint)
    • Line 502: warning: exported function Q_LinToMsg should have comment or be unexported (golint)
    • Line 502: warning: don't use underscores in Go names; func Q_LinToMsg should be QLinToMsg (golint)
    • Line 508: warning: exported function V3_LinToMsg should have comment or be unexported (golint)
    • Line 508: warning: don't use underscores in Go names; func V3_LinToMsg should be V3LinToMsg (golint)
    • Line 514: warning: exported function DirectionV3ToQuaternion should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/agent/session/room.go
    • Line 7: warning: should not use dot imports (golint)
    • Line 8: warning: should not use dot imports (golint)
    • Line 15: warning: exported type ChatMessage should have comment or be unexported (golint)
    • Line 21: warning: exported type ChatRoom should have comment or be unexported (golint)
    • Line 29: warning: exported var RoomManager should have comment or be unexported (golint)
    • Line 35: warning: exported type GameServer should have comment or be unexported (golint)
    • Line 83: warning: should omit 2nd value from range; this loop is equivalent to `for gs := range ...` (golint)
    • Line 103: warning: should omit 2nd value from range; this loop is equivalent to `for c := range ...` (golint)
    • Line 138: warning: exported function NewRoom should have comment or be unexported (golint)
    • Line 157: warning: exported type Room should have comment or be unexported (golint)
    • Line 172: warning: exported method Room.GetReview should have comment or be unexported (golint)
    • Line 179: warning: exported method Room.UpdateReview should have comment or be unexported (golint)
    • Line 189: warning: exported method Room.EnterRoom should have comment or be unexported (golint)
    • Line 206: warning: exported method Room.KickOut should have comment or be unexported (golint)
    • Line 222: warning: exported method Room.DeleteRoom should have comment or be unexported (golint)
    • Line 233: warning: should omit 2nd value from range; this loop is equivalent to `for s := range ...` (golint)
    • Line 239: warning: exported method Room.LeaveRoom should have comment or be unexported (golint)
    • Line 267: warning: exported method Room.UpdateRoomContent should have comment or be unexported (golint)
    • Line 276: warning: should omit 2nd value from range; this loop is equivalent to `for s := range ...` (golint)
    • Line 285: warning: should omit 2nd value from range; this loop is equivalent to `for s := range ...` (golint)
    • Line 291: warning: exported method Room.CheckReady should have comment or be unexported (golint)
    • Line 296: warning: should omit 2nd value from range; this loop is equivalent to `for s := range ...` (golint)
    • Line 306: warning: exported method Room.CreateRoomOnGameServer should have comment or be unexported (golint)
    • Line 315: warning: should omit 2nd value from range; this loop is equivalent to `for s := range ...` (golint)
    • Line 343: warning: should omit 2nd value from range; this loop is equivalent to `for s := range ...` (golint)
    • Distributed-Golang-Game-Server/agent/session/kubermanager.go
    • Line 27: warning: exported const NAME_SPACE should have comment or be unexported (golint)
    • Line 28: warning: exported const SERVER_AMOUNT should have comment or be unexported (golint)
    • Line 29: warning: exported const MAX_SERVER_AMOUT should have comment or be unexported (golint)
    • Line 30: warning: exported const MAX_PORT should have comment or be unexported (golint)
    • Line 31: warning: exported const MIN_PORT should have comment or be unexported (golint)
    • Line 37: warning: exported var PodMod should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/service/AgentToGame.go
    • Line 12: warning: exported type ATGServer should have comment or be unexported (golint)
    • Line 15: warning: exported method ATGServer.CreateSession should have comment or be unexported (golint)
    • Line 18: warning: exported method ATGServer.GetGameServerInfo should have comment or be unexported (golint)
    • Line 21: warning: exported method ATGServer.GetRoomList should have comment or be unexported (golint)
    • Line 34: warning: exported type ATGClient should have comment or be unexported (golint)
    • Line 37: warning: exported method ATGClient.CreateSession should have comment or be unexported (golint)
    • Line 40: warning: exported method ATGClient.GetGameServerInfo should have comment or be unexported (golint)
    • Line 43: warning: exported method ATGClient.GetRoomList should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/agent/ClientToAgent.go
    • Line 7: warning: should not use dot imports (golint)
    • Line 57: warning: exported type ErrorPipe should have comment or be unexported (golint)
    • Line 61: warning: exported function NewAgentRpc should have comment or be unexported (golint)
    • Line 70: warning: exported type Agent should have comment or be unexported (golint)
    • Line 76: warning: exported method Agent.Init should have comment or be unexported (golint)
    • Line 84: warning: exported method Agent.AquireSessionKey should have comment or be unexported (golint)
    • Line 88: warning: exported method Agent.AquireOtherAgent should have comment or be unexported (golint)
    • Line 92: warning: exported method Agent.GetSessionCache should have comment or be unexported (golint)
    • Line 106: warning: exported method Agent.Login should have comment or be unexported (golint)
    • Line 120: warning: exported method Agent.CreateAccount should have comment or be unexported (golint)
    • Line 125: warning: comment on exported method Agent.SetAccount should be of the form "SetAccount ..." (golint)
    • Line 130: warning: exported method Agent.SetCharacter should have comment or be unexported (golint)
    • Line 143: warning: comment on exported method Agent.AquireGameServer should be of the form "AquireGameServer ..." (golint)
    • Line 159: warning: comment on exported method Agent.UpdateHome should be of the form "UpdateHome ..." (golint)
    • Line 164: warning: exported method Agent.UpdateRoomList should have comment or be unexported (golint)
    • Line 183: warning: exported method Agent.UpdateUserList should have comment or be unexported (golint)
    • Line 187: warning: comment on exported method Agent.Pipe should be of the form "Pipe ..." (golint)
    • Line 191: warning: exported method Agent.CreateRoom should have comment or be unexported (golint)
    • Line 202: warning: exported method Agent.JoinRoom should have comment or be unexported (golint)
    • Line 216: warning: exported method Agent.UpdateRoomContent should have comment or be unexported (golint)
    • Line 235: warning: exported method Agent.RoomReady should have comment or be unexported (golint)
    • Line 259: warning: exported function GetSesionFromContext should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/agent/session/session.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 7: warning: should not use dot imports (golint)
    • Line 14: warning: exported type MsgChannel should have comment or be unexported (golint)
    • Line 19: warning: exported method MsgChannel.Close should have comment or be unexported (golint)
    • Line 28: warning: exported function NewMsgChannel should have comment or be unexported (golint)
    • Line 35: warning: exported function NewMsgChannelManager should have comment or be unexported (golint)
    • Line 41: warning: exported type MsgChannelManager should have comment or be unexported (golint)
    • Line 45: warning: exported method MsgChannelManager.AddMsgChan should have comment or be unexported (golint)
    • Line 53: warning: exported method MsgChannelManager.GetMsgChan should have comment or be unexported (golint)
    • Line 57: warning: exported method MsgChannelManager.CloseMsgChan should have comment or be unexported (golint)
    • Line 116: warning: exported function NewSession should have comment or be unexported (golint)
    • Line 131: warning: exported type Session should have comment or be unexported (golint)
    • Line 146: warning: exported method Session.GetPlayerInfo should have comment or be unexported (golint)
    • Line 166: warning: exported method Session.SetState should have comment or be unexported (golint)
    • Line 166: warning: don't use underscores in Go names; method parameter state_index should be stateIndex (golint)
    • Line 170: warning: exported method Session.GetSessionInfo should have comment or be unexported (golint)
    • Line 182: warning: exported method Session.GetSessionCache should have comment or be unexported (golint)
    • Line 189: warning: exported type SessionState should have comment or be unexported (golint)
    • Line 212: warning: exported method SessionStateBase.SetSession should have comment or be unexported (golint)
    • Line 224: warning: exported method SessionStateBase.SetStateCode should have comment or be unexported (golint)
    • Line 227: warning: exported method SessionStateBase.GetStateCode should have comment or be unexported (golint)
    • Line 230: warning: exported method SessionStateBase.CreateSession should have comment or be unexported (golint)
    • Line 233: warning: exported method SessionStateBase.Login should have comment or be unexported (golint)
    • Line 236: warning: exported method SessionStateBase.Logout should have comment or be unexported (golint)
    • Line 239: warning: exported method SessionStateBase.Regist should have comment or be unexported (golint)
    • Line 242: warning: exported method SessionStateBase.CreateRoom should have comment or be unexported (golint)
    • Line 245: warning: exported method SessionStateBase.EnterRoom should have comment or be unexported (golint)
    • Line 248: warning: exported method SessionStateBase.DeleteRoom should have comment or be unexported (golint)
    • Line 251: warning: exported method SessionStateBase.ReadyRoom should have comment or be unexported (golint)
    • Line 254: warning: exported method SessionStateBase.LeaveRoom should have comment or be unexported (golint)
    • Line 257: warning: exported method SessionStateBase.StartRoom should have comment or be unexported (golint)
    • Line 260: warning: exported method SessionStateBase.SettingCharacter should have comment or be unexported (golint)
    • Line 263: warning: exported method SessionStateBase.SettingRoom should have comment or be unexported (golint)
    • Line 266: warning: exported method SessionStateBase.EndRoom should have comment or be unexported (golint)
    • Line 270: warning: exported method SessionStateBase.CancelReady should have comment or be unexported (golint)
    • Line 274: warning: exported type SessionStateBase should have comment or be unexported (golint)
    • Line 280: warning: exported type NoSessionState should have comment or be unexported (golint)
    • Line 284: warning: exported method NoSessionState.CreateSession should have comment or be unexported (golint)
    • Line 295: warning: exported type GuestSessionState should have comment or be unexported (golint)
    • Line 299: warning: exported method GuestSessionState.Regist should have comment or be unexported (golint)
    • Line 309: warning: exported method GuestSessionState.Login should have comment or be unexported (golint)
    • Line 334: warning: exported type UserIdleSessionState should have comment or be unexported (golint)
    • Line 338: warning: exported method UserIdleSessionState.CreateRoom should have comment or be unexported (golint)
    • Line 351: warning: exported method UserIdleSessionState.EnterRoom should have comment or be unexported (golint)
    • Line 362: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 369: warning: exported type UserInRoomSessionState should have comment or be unexported (golint)
    • Line 373: warning: exported method UserInRoomSessionState.DeleteRoom should have comment or be unexported (golint)
    • Line 377: warning: exported method UserInRoomSessionState.ReadyRoom should have comment or be unexported (golint)
    • Line 383: warning: exported method UserInRoomSessionState.LeaveRoom should have comment or be unexported (golint)
    • Line 390: warning: exported method UserInRoomSessionState.SettingCharacter should have comment or be unexported (golint)
    • Line 398: warning: exported method UserInRoomSessionState.CancelReady should have comment or be unexported (golint)
    • Line 404: warning: exported type ConnectingGameSessionState should have comment or be unexported (golint)
    • Line 408: warning: exported method ConnectingGameSessionState.EndRoom should have comment or be unexported (golint)
    • Line 415: warning: don't use underscores in Go names; method parameter state_code should be stateCode (golint)
    • Line 438: warning: exported var Manager should have comment or be unexported (golint)
    • Line 440: warning: exported var SessionStateFactory should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/user/user.go
    • Line 4: warning: should not use dot imports (golint)
    • Line 6: warning: should not use dot imports (golint)
    • Line 14: warning: exported function NewUserManager should have comment or be unexported (golint)
    • Line 21: warning: exported type UserManager should have comment or be unexported (golint)
    • Line 27: warning: exported method UserManager.Login should have comment or be unexported (golint)
    • Line 48: warning: exported method UserManager.Logout should have comment or be unexported (golint)
    • Line 57: warning: exported method UserManager.Regist should have comment or be unexported (golint)
    • Line 68: warning: exported method UserManager.GetUserInfo should have comment or be unexported (golint)
    • Line 75: warning: exported type User should have comment or be unexported (golint)
    • Line 80: warning: exported method User.Login should have comment or be unexported (golint)
    • Line 86: warning: exported method User.GetInfo should have comment or be unexported (golint)
    • Line 93: warning: exported method User.SetCharacter should have comment or be unexported (golint)
    • Line 106: 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 110: warning: exported function NewCharacter should have comment or be unexported (golint)
    • Line 123: warning: exported function NewUserInfo should have comment or be unexported (golint)
    • Line 134: warning: exported var Manager should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/entity/room.go
    • Line 4: warning: should not use dot imports (golint)
    • Line 7: warning: should not use dot imports (golint)
    • Line 19: warning: exported const FRAME_INTERVAL should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type IGameBehavier should have comment or be unexported (golint)
    • Line 30: warning: exported type IRoom should have comment or be unexported (golint)
    • Line 43: warning: exported type Room should have comment or be unexported (golint)
    • Line 55: warning: exported method Room.UserDisconnect should have comment or be unexported (golint)
    • Line 70: warning: exported method Room.UserReconnect should have comment or be unexported (golint)
    • Line 74: warning: exported method Room.Init should have comment or be unexported (golint)
    • Line 92: warning: exported method Room.Tick should have comment or be unexported (golint)
    • Line 101: warning: exported method Room.Destroy should have comment or be unexported (golint)
    • Line 110: warning: exported method Room.DestroyEntity should have comment or be unexported (golint)
    • Line 122: warning: exported method Room.GetInfo should have comment or be unexported (golint)
    • Line 129: warning: exported method Room.Ready should have comment or be unexported (golint)
    • Line 136: warning: exported method Room.EnterRoom should have comment or be unexported (golint)
    • Line 152: warning: exported method Room.LeaveRoom should have comment or be unexported (golint)
    • Line 162: warning: exported method Room.Run should have comment or be unexported (golint)
    • Line 196: warning: exported method Room.GetUserInRoom should have comment or be unexported (golint)
    • Line 198: warning: should omit 2nd value from range; this loop is equivalent to `for id := range ...` (golint)
    • Line 205: warning: exported method Room.GetAllTransform should have comment or be unexported (golint)
    • Line 217: warning: exported method Room.SendFuncToAll should have comment or be unexported (golint)
    • Line 226: warning: exported method Room.CreateEnemies should have comment or be unexported (golint)
    • Line 233: warning: exported method Room.CreateEnemy should have comment or be unexported (golint)
    • Line 265: warning: should omit 2nd value from range; this loop is equivalent to `for id := range ...` (golint)
    • Line 299: warning: comment on exported method Room.CreateShell should be of the form "CreateShell ..." (golint)
    • Line 318: warning: should omit 2nd value from range; this loop is equivalent to `for id := range ...` (golint)
    • Line 323: warning: exported method Room.PhysicUpdate should have comment or be unexported (golint)
    • Distributed-Golang-Game-Server/game/entity/shell.go
    • Line 10: warning: exported const ExplosionRadius should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type Shell should have comment or be unexported (golint)
    • Line 20: warning: exported method Shell.PhysicUpdate should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign88%

IneffAssign detects ineffectual assignments in Go code.


misspell88%

Misspell Finds commonly misspelled English words