Preparing report...

Report for github.com/jennal/goplay

A+    Excellent!    Found 72 issues across 97 files

Tweet

gofmt97%

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.


golint26%

Golint is a linter for Go source code.

    • goplay/session/session.go
    • Line 29: warning: exported var IDGen should have comment or be unexported (golint)
    • Line 31: warning: exported type Session should have comment or be unexported (golint)
    • Line 43: warning: exported function NewSession should have comment or be unexported (golint)
    • Line 54: warning: exported method Session.MarshalData should have comment or be unexported (golint)
    • Line 62: warning: exported method Session.UnmarshalData should have comment or be unexported (golint)
    • Line 70: warning: exported method Session.Bind should have comment or be unexported (golint)
    • Line 74: warning: exported method Session.BindClientID should have comment or be unexported (golint)
    • Line 78: warning: exported method Session.SetEncoding should have comment or be unexported (golint)
    • Line 88: warning: exported method Session.Response should have comment or be unexported (golint)
    • Line 96: warning: exported method Session.ResponseRaw should have comment or be unexported (golint)
    • Line 105: warning: exported method Session.Push should have comment or be unexported (golint)
    • Line 113: warning: exported method Session.PushRaw should have comment or be unexported (golint)
    • Line 122: warning: exported method Session.Broadcast should have comment or be unexported (golint)
    • Line 131: warning: exported method Session.FlushPushCache should have comment or be unexported (golint)
    • goplay/service/service_test.go
    • Line 51: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 56: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 61: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 67: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 74: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 79: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 84: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 89: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 95: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 101: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/main.go
    • Line 36: warning: exported type Handler should have comment or be unexported (golint)
    • Line 38: warning: exported method Handler.OnStarted should have comment or be unexported (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 42: warning: exported method Handler.OnError should have comment or be unexported (golint)
    • Line 42: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 46: warning: exported method Handler.OnBeforeStop should have comment or be unexported (golint)
    • Line 46: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 50: warning: exported method Handler.OnStopped should have comment or be unexported (golint)
    • Line 50: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 54: warning: exported method Handler.OnNewClient should have comment or be unexported (golint)
    • Line 54: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 73: warning: exported method Handler.Test should have comment or be unexported (golint)
    • Line 73: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 79: warning: exported method Handler.Add should have comment or be unexported (golint)
    • Line 79: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/encode/base.go
    • Line 15: warning: exported type Base should have comment or be unexported (golint)
    • Line 19: warning: exported method Base.Marshal should have comment or be unexported (golint)
    • Line 27: warning: exported method Base.Unmarshal should have comment or be unexported (golint)
    • goplay/service/processor_client.go
    • Line 34: warning: exported type ProcessorClient should have comment or be unexported (golint)
    • Line 51: warning: comment on exported function NewProcessorClient should be of the form "NewProcessorClient ..." (golint)
    • Line 74: warning: exported method ProcessorClient.SetRouter should have comment or be unexported (golint)
    • Line 74: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 78: warning: exported method ProcessorClient.RegistFilter should have comment or be unexported (golint)
    • Line 78: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 82: warning: exported method ProcessorClient.SetFilters should have comment or be unexported (golint)
    • Line 82: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 86: warning: exported method ProcessorClient.SetHeartBeatManager should have comment or be unexported (golint)
    • Line 86: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 90: warning: exported method ProcessorClient.Connect should have comment or be unexported (golint)
    • Line 404: warning: exported method ProcessorClient.AddListener should have comment or be unexported (golint)
    • goplay/transfer/websocket/conn_wrapper.go
    • Line 26: warning: error var ERR_WRONG_MESSAGE_TYPE should have name of the form ErrFoo (golint)
    • Line 26: warning: exported var ERR_WRONG_MESSAGE_TYPE should have comment or be unexported (golint)
    • Line 29: warning: exported type Conn should have comment or be unexported (golint)
    • Line 35: warning: exported function NewConn should have comment or be unexported (golint)
    • Line 81: warning: exported method Conn.SetDeadline should have comment or be unexported (golint)
    • goplay/helpers/reflect.go
    • Line 19: warning: exported var TYPE_BYTES should have comment or be unexported (golint)
    • Line 22: warning: exported function GetValueFromPtr should have comment or be unexported (golint)
    • Line 26: warning: exported function IsBytesType should have comment or be unexported (golint)
    • goplay/transfer/tcp/client.go
    • Line 27: warning: exported function NewClientWithConnect should have comment or be unexported (golint)
    • Line 35: warning: exported function NewClient should have comment or be unexported (golint)
    • goplay/data/tag.go
    • Line 26: warning: exported type TagContainerImpl should have comment or be unexported (golint)
    • Line 31: warning: exported function NewTagContainer should have comment or be unexported (golint)
    • Line 37: warning: exported method TagContainerImpl.Contains should have comment or be unexported (golint)
    • Line 51: warning: exported method TagContainerImpl.Add should have comment or be unexported (golint)
    • Line 60: warning: exported method TagContainerImpl.Remove should have comment or be unexported (golint)
    • goplay/pkg/handshake_global.go
    • Line 5: warning: exported type HandShakeImpl should have comment or be unexported (golint)
    • Line 12: warning: exported type HandShake should have comment or be unexported (golint)
    • Line 37: warning: exported function SetHandShakeImpl should have comment or be unexported (golint)
    • Line 53: warning: exported function DefaultHandShake should have comment or be unexported (golint)
    • Line 57: warning: exported function NewHandShakeImpl should have comment or be unexported (golint)
    • Line 66: warning: exported method HandShakeImpl.RegistSpecRoute should have comment or be unexported (golint)
    • Line 75: warning: exported method HandShakeImpl.MergeRpcRoutesMap should have comment or be unexported (golint)
    • Line 79: warning: exported method HandShakeImpl.AddRoutesMap should have comment or be unexported (golint)
    • Line 89: warning: exported method HandShakeImpl.UpdateHandShakeResponse should have comment or be unexported (golint)
    • Line 100: warning: exported method HandShakeImpl.RoutesMap should have comment or be unexported (golint)
    • Line 104: warning: exported method HandShakeImpl.RpcRoutesMap should have comment or be unexported (golint)
    • Line 108: warning: exported method HandShakeImpl.SpecRoutesMap should have comment or be unexported (golint)
    • Line 112: warning: exported method HandShakeImpl.GetIndexRoute should have comment or be unexported (golint)
    • Line 124: warning: exported method HandShakeImpl.GetStringRoute should have comment or be unexported (golint)
    • Line 136: warning: exported method HandShakeImpl.ConvertRouteIndexToRpc should have comment or be unexported (golint)
    • Line 140: warning: exported method HandShakeImpl.ConvertRouteIndexFromRpc should have comment or be unexported (golint)
    • goplay/service/service.go
    • Line 32: warning: exported type Service should have comment or be unexported (golint)
    • Line 49: warning: exported function NewService should have comment or be unexported (golint)
    • Line 66: warning: exported method Service.Router should have comment or be unexported (golint)
    • Line 66: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 70: warning: exported method Service.Handlers should have comment or be unexported (golint)
    • Line 70: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 74: warning: exported method Service.Filters should have comment or be unexported (golint)
    • Line 74: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 78: warning: exported method Service.ServiceClients should have comment or be unexported (golint)
    • Line 78: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 82: warning: exported method Service.SetEncoding should have comment or be unexported (golint)
    • Line 82: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 91: warning: exported method Service.SetSettings should have comment or be unexported (golint)
    • Line 91: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 106: warning: exported method Service.RegistHanlder should have comment or be unexported (golint)
    • Line 106: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 111: warning: exported method Service.RegistHanlderGroup should have comment or be unexported (golint)
    • Line 111: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 120: warning: exported method Service.RegistFilter should have comment or be unexported (golint)
    • Line 120: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 124: warning: exported method Service.OnStarted should have comment or be unexported (golint)
    • Line 124: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 131: warning: exported method Service.OnError should have comment or be unexported (golint)
    • Line 131: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 135: warning: exported method Service.OnBeforeStop should have comment or be unexported (golint)
    • Line 135: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 146: warning: exported method Service.OnStopped should have comment or be unexported (golint)
    • Line 146: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 153: warning: exported method Service.RegistNewClient should have comment or be unexported (golint)
    • Line 153: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 183: warning: exported method Service.FilterOnNewClient should have comment or be unexported (golint)
    • Line 183: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 193: warning: exported method Service.HandlerOnNewClient should have comment or be unexported (golint)
    • Line 193: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 199: warning: exported method Service.OnNewClient should have comment or be unexported (golint)
    • Line 199: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/service/settings.go
    • Line 5: warning: exported type Settings should have comment or be unexported (golint)
    • Line 13: warning: exported function DefaultSettings should have comment or be unexported (golint)
    • Line 17: warning: exported type SettingContainer should have comment or be unexported (golint)
    • Line 21: warning: exported function NewSettingContainer should have comment or be unexported (golint)
    • Line 27: warning: exported method SettingContainer.SetSettings should have comment or be unexported (golint)
    • Line 36: warning: exported method SettingContainer.Settings should have comment or be unexported (golint)
    • goplay/log/static.go
    • Line 59: warning: exported function RecoverErrorf should have comment or be unexported (golint)
    • Line 63: warning: exported function StackTrace should have comment or be unexported (golint)
    • goplay/transfer/tcp/tcp_test.go
    • Line 37: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 40: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 43: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 46: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 49: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/channel/channel_manager.go
    • Line 20: warning: exported type ChannelManager should have comment or be unexported (golint)
    • Line 29: warning: exported function GetChannelManager should have comment or be unexported (golint)
    • Line 39: warning: exported method ChannelManager.ChannelNames should have comment or be unexported (golint)
    • Line 51: warning: exported method ChannelManager.Channels should have comment or be unexported (golint)
    • Line 63: warning: exported method ChannelManager.Create should have comment or be unexported (golint)
    • Line 74: warning: exported method ChannelManager.Get should have comment or be unexported (golint)
    • goplay/filter/heartbeat/heartbeat_manager.go
    • Line 26: warning: exported type HeartBeatManager should have comment or be unexported (golint)
    • Line 38: warning: exported function NewHeartBeatManager should have comment or be unexported (golint)
    • Line 44: warning: exported method HeartBeatManager.OnNewClient should have comment or be unexported (golint)
    • Line 44: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 65: warning: exported method HeartBeatManager.OnRecv should have comment or be unexported (golint)
    • Line 65: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 83: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 95: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 99: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 103: warning: exported method HeartBeatManager.Info should have comment or be unexported (golint)
    • Line 103: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/cmd/cmd.go
    • Line 24: warning: exported function Start should have comment or be unexported (golint)
    • Line 41: warning: exported function StartAll should have comment or be unexported (golint)
    • goplay/pkg/types_func.go
    • Line 16: warning: exported method PackageType.HasResponse should have comment or be unexported (golint)
    • Line 25: warning: exported method PackageType.ToResponse should have comment or be unexported (golint)
    • Line 47: warning: exported method PackageType.IsRPC should have comment or be unexported (golint)
    • goplay/router/router.go
    • Line 28: warning: exported var TYPE_IHANDLER should have comment or be unexported (golint)
    • Line 35: warning: exported type Router should have comment or be unexported (golint)
    • Line 39: warning: exported function NewRouter should have comment or be unexported (golint)
    • Line 56: warning: exported method Router.GetKeys should have comment or be unexported (golint)
    • Line 66: warning: exported method Router.Add should have comment or be unexported (golint)
    • Line 88: warning: exported method Router.Get should have comment or be unexported (golint)
    • goplay/filter/handshake/handshake_filter.go
    • Line 29: warning: exported type HandShakeFilter should have comment or be unexported (golint)
    • Line 33: warning: exported function NewHandShakeFilter should have comment or be unexported (golint)
    • Line 37: warning: exported function GetHandShakeRequest should have comment or be unexported (golint)
    • Line 50: warning: exported method HandShakeFilter.SetReconnectTo should have comment or be unexported (golint)
    • Line 50: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 54: warning: exported method HandShakeFilter.OnNewClient should have comment or be unexported (golint)
    • Line 54: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 58: warning: exported method HandShakeFilter.OnRecv should have comment or be unexported (golint)
    • Line 58: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/transfer/interface.go
    • Line 21: warning: exported type IHeaderCreator should have comment or be unexported (golint)
    • Line 27: warning: exported type IClient should have comment or be unexported (golint)
    • Line 48: warning: exported type IClientDelegate should have comment or be unexported (golint)
    • Line 56: warning: exported type IServer should have comment or be unexported (golint)
    • Line 74: warning: exported type IServerDelegate should have comment or be unexported (golint)
    • goplay/transfer/base/header_creator.go
    • Line 18: warning: exported type HeaderCreator should have comment or be unexported (golint)
    • Line 22: warning: exported function NewHeaderCreator should have comment or be unexported (golint)
    • Line 28: warning: exported method HeaderCreator.NewHeader 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)
    • Line 32: warning: exported method HeaderCreator.NewHeartBeatHeader should have comment or be unexported (golint)
    • Line 32: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 36: warning: exported method HeaderCreator.NewHeartBeatResponseHeader should have comment or be unexported (golint)
    • Line 36: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/pkg/header.go
    • Line 23: warning: exported const HEADER_STATIC_SIZE should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type Header should have comment or be unexported (golint)
    • Line 39: warning: exported function NewHeader should have comment or be unexported (golint)
    • Line 54: warning: exported function NewRpcHeader should have comment or be unexported (golint)
    • Line 73: warning: exported function NewHeaderFromRpc should have comment or be unexported (golint)
    • Line 98: warning: exported method Header.Marshal should have comment or be unexported (golint)
    • Line 98: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 125: warning: exported function ReadHeader should have comment or be unexported (golint)
    • Line 188: warning: exported function UnmarshalHeader should have comment or be unexported (golint)
    • Line 215: warning: exported function UnmarshalStaticHeader should have comment or be unexported (golint)
    • Line 261: warning: exported function UnmarshalDynamicHeader should have comment or be unexported (golint)
    • goplay/pkg/heartbeat_header.go
    • Line 15: warning: exported function NewHeartBeatHeader should have comment or be unexported (golint)
    • Line 19: warning: exported function NewHeartBeatResponseHeader should have comment or be unexported (golint)
    • goplay/session/session_manager.go
    • Line 21: warning: exported type SessionManager should have comment or be unexported (golint)
    • Line 26: warning: exported function NewSessionManager should have comment or be unexported (golint)
    • Line 32: warning: exported method SessionManager.Add should have comment or be unexported (golint)
    • Line 32: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 52: warning: exported method SessionManager.Remove should have comment or be unexported (golint)
    • Line 52: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 67: warning: exported method SessionManager.Clear should have comment or be unexported (golint)
    • Line 67: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 74: warning: exported method SessionManager.Exists should have comment or be unexported (golint)
    • Line 74: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 83: warning: exported method SessionManager.Count should have comment or be unexported (golint)
    • Line 83: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 96: warning: exported method SessionManager.Sessions should have comment or be unexported (golint)
    • Line 96: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 111: warning: exported method SessionManager.GetSessionByID should have comment or be unexported (golint)
    • Line 111: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/service/service_client.go
    • Line 38: warning: exported type ServiceClient should have comment or be unexported (golint)
    • Line 56: warning: comment on exported function NewServiceClient should be of the form "NewServiceClient ..." (golint)
    • Line 80: warning: exported method ServiceClient.RegistFilter should have comment or be unexported (golint)
    • Line 80: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 84: warning: exported method ServiceClient.SetFilters should have comment or be unexported (golint)
    • Line 84: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 88: warning: exported method ServiceClient.SetHeartBeatManager should have comment or be unexported (golint)
    • Line 88: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 92: warning: exported method ServiceClient.Connect should have comment or be unexported (golint)
    • Line 336: warning: exported method ServiceClient.Request should have comment or be unexported (golint)
    • Line 357: warning: exported method ServiceClient.Notify should have comment or be unexported (golint)
    • Line 367: warning: exported method ServiceClient.Push should have comment or be unexported (golint)
    • Line 371: warning: exported method ServiceClient.AddListener should have comment or be unexported (golint)
    • goplay/transfer/websocket/server.go
    • Line 30: warning: exported const URL_PREFIX should have comment (or a comment on this block) or be unexported (golint)
    • Line 48: warning: exported function NewServer should have comment or be unexported (golint)
    • goplay/transfer/websocket/websocket_test.go
    • Line 39: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 43: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 51: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 55: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/log/color/unix.go
    • Line 20: warning: exported var Info should have comment or be unexported (golint)
    • Line 21: warning: exported var Trace should have comment or be unexported (golint)
    • Line 22: warning: exported var Error should have comment or be unexported (golint)
    • Line 24: warning: exported var Red should have comment or be unexported (golint)
    • Line 25: warning: exported var Green should have comment or be unexported (golint)
    • Line 26: warning: exported var Cyan should have comment or be unexported (golint)
    • Line 27: warning: exported var Blue should have comment or be unexported (golint)
    • Line 28: warning: exported var Yellow should have comment or be unexported (golint)
    • Line 29: warning: exported var Magenta should have comment or be unexported (golint)
    • Line 30: warning: exported var Black should have comment or be unexported (golint)
    • Line 31: warning: exported var White should have comment or be unexported (golint)
    • Line 33: warning: exported var HiRed should have comment or be unexported (golint)
    • Line 34: warning: exported var HiGreen should have comment or be unexported (golint)
    • Line 35: warning: exported var HiCyan should have comment or be unexported (golint)
    • Line 36: warning: exported var HiBlue should have comment or be unexported (golint)
    • Line 37: warning: exported var HiYellow should have comment or be unexported (golint)
    • Line 38: warning: exported var HiMagenta should have comment or be unexported (golint)
    • Line 39: warning: exported var HiBlack should have comment or be unexported (golint)
    • Line 40: warning: exported var HiWhite should have comment or be unexported (golint)
    • goplay/pkg/id_gen.go
    • Line 21: warning: exported type IDGen should have comment or be unexported (golint)
    • Line 25: warning: exported function NewIDGen should have comment or be unexported (golint)
    • Line 31: warning: exported method IDGen.NextID should have comment or be unexported (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/router/method.go
    • Line 27: warning: exported type Method should have comment or be unexported (golint)
    • Line 32: warning: exported function NewMethod should have comment or be unexported (golint)
    • Line 39: warning: exported method Method.Call should have comment or be unexported (golint)
    • Line 88: warning: exported method Method.CallArgs should have comment or be unexported (golint)
    • Line 107: warning: exported method Method.NewArg should have comment or be unexported (golint)
    • Line 119: warning: exported method Method.NumIn should have comment or be unexported (golint)
    • goplay/transfer/base/server_base.go
    • Line 24: warning: exported type IServerImplement should have comment or be unexported (golint)
    • Line 32: warning: exported type Server should have comment or be unexported (golint)
    • Line 46: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 57: warning: exported method Server.SetImplement should have comment or be unexported (golint)
    • Line 61: warning: exported method Server.RegistDelegate should have comment or be unexported (golint)
    • Line 61: warning: receiver name serv should be consistent with previous receiver name server for Server (golint)
    • Line 69: warning: exported method Server.UnregistDelegate should have comment or be unexported (golint)
    • Line 69: warning: receiver name serv should be consistent with previous receiver name server for Server (golint)
    • Line 77: warning: exported method Server.Host should have comment or be unexported (golint)
    • Line 77: warning: receiver name serv should be consistent with previous receiver name server for Server (golint)
    • Line 81: warning: exported method Server.Port should have comment or be unexported (golint)
    • Line 81: warning: receiver name serv should be consistent with previous receiver name server for Server (golint)
    • Line 85: warning: exported method Server.IsStarted should have comment or be unexported (golint)
    • Line 85: warning: receiver name serv should be consistent with previous receiver name server for Server (golint)
    • Line 89: warning: exported method Server.Addr should have comment or be unexported (golint)
    • Line 89: warning: receiver name serv should be consistent with previous receiver name server for Server (golint)
    • Line 97: warning: exported method Server.Clients should have comment or be unexported (golint)
    • Line 97: warning: receiver name serv should be consistent with previous receiver name server for Server (golint)
    • Line 101: warning: exported method Server.GetClientById should have comment or be unexported (golint)
    • Line 101: warning: receiver name serv should be consistent with previous receiver name server for Server (golint)
    • Line 108: warning: exported method Server.Start should have comment or be unexported (golint)
    • Line 108: warning: receiver name serv should be consistent with previous receiver name server for Server (golint)
    • Line 164: warning: exported method Server.Stop should have comment or be unexported (golint)
    • Line 164: warning: receiver name serv should be consistent with previous receiver name server for Server (golint)
    • goplay/helpers/id_gen.go
    • Line 15: warning: exported type IDGen should have comment or be unexported (golint)
    • Line 21: warning: exported function NewIDGen should have comment or be unexported (golint)
    • Line 25: warning: exported function NewIDGen2 should have comment or be unexported (golint)
    • Line 33: warning: exported method IDGen.NextID should have comment or be unexported (golint)
    • Line 33: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/event/event.go
    • Line 18: warning: exported type IEvent should have comment or be unexported (golint)
    • Line 25: warning: exported type EventFunc should have comment or be unexported (golint)
    • Line 27: warning: exported type Event should have comment or be unexported (golint)
    • Line 32: warning: exported function NewEvent should have comment or be unexported (golint)
    • Line 38: warning: exported method Event.On should have comment or be unexported (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 53: warning: exported method Event.Off should have comment or be unexported (golint)
    • Line 53: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 77: warning: exported method Event.Once should have comment or be unexported (golint)
    • Line 77: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 84: warning: exported method Event.Emit should have comment or be unexported (golint)
    • Line 84: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/transfer/wss/conn_wrapper.go
    • Line 26: warning: error var ERR_WRONG_MESSAGE_TYPE should have name of the form ErrFoo (golint)
    • Line 26: warning: exported var ERR_WRONG_MESSAGE_TYPE should have comment or be unexported (golint)
    • Line 29: warning: exported type Conn should have comment or be unexported (golint)
    • Line 35: warning: exported function NewConn should have comment or be unexported (golint)
    • Line 81: warning: exported method Conn.SetDeadline should have comment or be unexported (golint)
    • goplay/transfer/wss/server.go
    • Line 13: warning: package comment should be of the form "Package wss ..." (golint)
    • Line 30: warning: exported const URL_PREFIX should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: exported function NewServer should have comment or be unexported (golint)
    • goplay/pkg/types.go
    • Line 16: warning: comment on exported type PackageType should be of the form "PackageType ..." (with optional leading article) (golint)
    • Line 20: warning: exported const PKG_NOTIFY should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: comment on exported type EncodingType should be of the form "EncodingType ..." (with optional leading article) (golint)
    • Line 44: warning: exported const ENCODING_NONE should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: exported type PackageIDType should have comment or be unexported (golint)
    • Line 52: warning: exported type PackageSizeType should have comment or be unexported (golint)
    • Line 54: warning: comment on exported type RouteIndex should be of the form "RouteIndex ..." (with optional leading article) (golint)
    • Line 58: warning: exported const ROUTE_INDEX_NONE should have comment (or a comment on this block) or be unexported (golint)
    • Line 61: warning: exported type RouteMap should have comment or be unexported (golint)
    • goplay/transfer/addr.go
    • Line 7: warning: exported type Addr should have comment or be unexported (golint)
    • Line 17: warning: exported function NewAddr should have comment or be unexported (golint)
    • goplay/log/base.go
    • Line 28: warning: exported const SKIP should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported var INFO should have comment or be unexported (golint)
    • Line 37: warning: exported type Logger should have comment or be unexported (golint)
    • Line 65: warning: exported function NewLogger should have comment or be unexported (golint)
    • Line 130: warning: exported function GetStack should have comment or be unexported (golint)
    • goplay/event/method.go
    • Line 21: warning: exported type Method should have comment or be unexported (golint)
    • Line 27: warning: exported function NewMethod should have comment or be unexported (golint)
    • Line 35: warning: exported method Method.Call should have comment or be unexported (golint)
    • Line 67: warning: exported method Method.NewArg should have comment or be unexported (golint)
    • goplay/filter/heartbeat/heartbeat_processor.go
    • Line 27: warning: exported const TIMEOUT should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported type HeartBeatProcessor should have comment or be unexported (golint)
    • Line 51: warning: exported function NewHeartBeatProcessor should have comment or be unexported (golint)
    • Line 61: warning: exported method HeartBeatProcessor.Stop should have comment or be unexported (golint)
    • Line 61: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 65: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 72: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 85: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 115: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 129: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 137: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 143: warning: exported method HeartBeatProcessor.SetClient should have comment or be unexported (golint)
    • Line 143: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 167: warning: exported method HeartBeatProcessor.OnRecv should have comment or be unexported (golint)
    • Line 167: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 207: warning: exported method HeartBeatProcessor.Info should have comment or be unexported (golint)
    • Line 207: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/encode/bson.go
    • Line 17: warning: exported type Bson should have comment or be unexported (golint)
    • Line 20: warning: exported method Bson.Marshal should have comment or be unexported (golint)
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 24: warning: exported method Bson.Unmarshal should have comment or be unexported (golint)
    • Line 24: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 28: warning: exported function NewBson should have comment or be unexported (golint)
    • goplay/pkg/error.go
    • Line 19: warning: exported function NewErrorMessage should have comment or be unexported (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/pkg/handshake_header.go
    • Line 15: warning: exported function NewHandShakeHeader should have comment or be unexported (golint)
    • Line 27: warning: exported function NewHandShakeResponseHeader should have comment or be unexported (golint)
    • goplay/data/map.go
    • Line 33: warning: exported method Map.Remove should have comment or be unexported (golint)
    • Line 40: warning: exported method Map.Set should have comment or be unexported (golint)
    • Line 47: warning: exported method Map.HasKey should have comment or be unexported (golint)
    • Line 55: warning: exported method Map.Int should have comment or be unexported (golint)
    • Line 71: warning: exported method Map.Int8 should have comment or be unexported (golint)
    • Line 87: warning: exported method Map.Int16 should have comment or be unexported (golint)
    • Line 103: warning: exported method Map.Int32 should have comment or be unexported (golint)
    • Line 119: warning: exported method Map.Int64 should have comment or be unexported (golint)
    • Line 135: warning: exported method Map.Uint should have comment or be unexported (golint)
    • Line 151: warning: exported method Map.Uint8 should have comment or be unexported (golint)
    • Line 167: warning: exported method Map.Uint16 should have comment or be unexported (golint)
    • Line 183: warning: exported method Map.Uint32 should have comment or be unexported (golint)
    • Line 199: warning: exported method Map.Uint64 should have comment or be unexported (golint)
    • Line 215: warning: exported method Map.Float32 should have comment or be unexported (golint)
    • Line 231: warning: exported method Map.Float64 should have comment or be unexported (golint)
    • Line 263: warning: exported method Map.Value should have comment or be unexported (golint)
    • Line 270: warning: comment on exported method Map.State should be of the form "State ..." (golint)
    • goplay/encode/protobuf.go
    • Line 29: warning: exported method Protobuf.Marshal should have comment or be unexported (golint)
    • Line 29: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 41: warning: exported method Protobuf.Unmarshal should have comment or be unexported (golint)
    • Line 41: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 53: warning: exported function NewProtobuf should have comment or be unexported (golint)
    • goplay/transfer/common/error_timeout.go
    • Line 5: warning: exported type ErrorTimeout should have comment or be unexported (golint)
    • Line 9: warning: exported function NewErrorTimeout should have comment or be unexported (golint)
    • Line 15: warning: exported method ErrorTimeout.Timeout should have comment or be unexported (golint)
    • goplay/transfer/wss/websocket_test.go
    • Line 39: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 43: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 51: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 55: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/channel/channel.go
    • Line 24: warning: exported const CHANNEL_PREFIX should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type Channel should have comment or be unexported (golint)
    • Line 33: warning: exported function NewChannel should have comment or be unexported (golint)
    • Line 41: warning: exported method Channel.Name should have comment or be unexported (golint)
    • Line 45: warning: exported method Channel.Route should have comment or be unexported (golint)
    • Line 62: warning: comment on exported method Channel.BroadcastRaw should be of the form "BroadcastRaw ..." (golint)
    • goplay/event/event_test.go
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • goplay/encode/gob.go
    • Line 20: warning: exported type Gob should have comment or be unexported (golint)
    • Line 23: warning: exported method Gob.Marshal should have comment or be unexported (golint)
    • Line 23: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: exported method Gob.Unmarshal should have comment or be unexported (golint)
    • Line 30: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 36: warning: exported function NewGob should have comment or be unexported (golint)
    • goplay/encode/interface.go
    • Line 15: warning: exported type Encoder should have comment or be unexported (golint)
    • Line 19: warning: exported type Decoder should have comment or be unexported (golint)
    • Line 23: warning: exported type EncodeDecoder should have comment or be unexported (golint)
    • goplay/helpers/buffer.go
    • Line 7: warning: exported type Buffer should have comment or be unexported (golint)
    • Line 11: warning: exported function NewBuffer should have comment or be unexported (golint)
    • Line 17: warning: exported method Buffer.WriteUInt16 should have comment or be unexported (golint)
    • Line 25: warning: exported method Buffer.WriteUInt32 should have comment or be unexported (golint)
    • Line 33: warning: exported method Buffer.ReadUInt16 should have comment or be unexported (golint)
    • Line 51: warning: exported method Buffer.ReadUInt32 should have comment or be unexported (golint)
    • goplay/helpers/type_convert.go
    • Line 22: warning: exported function GetBytes should have comment or be unexported (golint)
    • Line 29: warning: exported function ToUInt32 should have comment or be unexported (golint)
    • Line 41: warning: exported function ToUInt16 should have comment or be unexported (golint)
    • goplay/transfer/wss/client.go
    • Line 28: warning: exported function NewClientWithConnect should have comment or be unexported (golint)
    • Line 36: warning: exported function NewClient should have comment or be unexported (golint)
    • goplay/interfaces/package_encode_decoder.go
    • Line 5: warning: exported type PackageEncoder should have comment or be unexported (golint)
    • Line 9: warning: exported type PackageDecoder should have comment or be unexported (golint)
    • Line 13: warning: exported type PackageEncodeDecoder should have comment or be unexported (golint)
    • goplay/encode/json.go
    • Line 22: warning: exported method Json.Marshal should have comment or be unexported (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 26: warning: exported method Json.Unmarshal should have comment or be unexported (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: exported function NewJson should have comment or be unexported (golint)
    • goplay/pkg/route_map.go
    • Line 3: warning: exported function NewRouteMap should have comment or be unexported (golint)
    • Line 7: warning: exported method RouteMap.Add should have comment or be unexported (golint)
    • Line 11: warning: exported method RouteMap.Merge should have comment or be unexported (golint)
    • Line 17: warning: exported method RouteMap.IsEmpty should have comment or be unexported (golint)
    • Line 25: warning: exported method RouteMap.GetIndexRoute should have comment or be unexported (golint)
    • Line 25: warning: receiver name r should be consistent with previous receiver name rm for RouteMap (golint)
    • Line 38: warning: exported method RouteMap.GetStringRoute should have comment or be unexported (golint)
    • Line 38: warning: receiver name r should be consistent with previous receiver name rm for RouteMap (golint)
    • goplay/channel/func.go
    • Line 18: warning: exported function IsPush should have comment or be unexported (golint)
    • Line 30: warning: exported function IsBroadcast should have comment or be unexported (golint)
    • Line 42: warning: exported function GetChannelName should have comment or be unexported (golint)
    • goplay/service/method.go
    • Line 19: warning: exported type Method should have comment or be unexported (golint)
    • Line 23: warning: exported function NewMethod should have comment or be unexported (golint)
    • goplay/transfer/base/client_base.go
    • Line 29: warning: error var ERR_ALREADY_CONNECTED should have name of the form ErrFoo (golint)
    • Line 29: warning: exported var ERR_ALREADY_CONNECTED should have comment or be unexported (golint)
    • Line 30: warning: error var ERR_READ_BEFORE_CONNECTED should have name of the form ErrFoo (golint)
    • Line 31: warning: error var ERR_WRITE_BEFORE_CONNECTED should have name of the form ErrFoo (golint)
    • Line 32: warning: error var ERR_CREATE_CONN_NOT_IMPLEMENTED should have name of the form ErrFoo (golint)
    • Line 37: warning: exported type IClientBaseImplement should have comment or be unexported (golint)
    • Line 41: warning: exported type Client should have comment or be unexported (golint)
    • Line 55: warning: exported function NewClientWithConnect should have comment or be unexported (golint)
    • Line 65: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 74: warning: exported method Client.SetImplement should have comment or be unexported (golint)
    • Line 78: warning: exported method Client.RegistDelegate should have comment or be unexported (golint)
    • Line 85: warning: exported method Client.UnregistDelegate should have comment or be unexported (golint)
    • Line 92: warning: exported method Client.LocalAddr should have comment or be unexported (golint)
    • Line 100: warning: exported method Client.RemoteAddr should have comment or be unexported (golint)
    • Line 108: warning: exported method Client.Id should have comment or be unexported (golint)
    • Line 112: warning: exported method Client.IsConnected should have comment or be unexported (golint)
    • Line 116: warning: exported method Client.Connect should have comment or be unexported (golint)
    • Line 133: warning: exported method Client.Disconnect should have comment or be unexported (golint)
    • Line 181: warning: exported method Client.Send should have comment or be unexported (golint)
    • Line 214: warning: exported method Client.Recv should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!