Preparing report...

Report for github.com/OpenIMSDK/Open-IM-Server

A+    Excellent!    Found 104 issues across 142 files

Tweet

gofmt99%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo97%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.


golint27%

Golint is a linter for Go source code.

    • Open-IM-Server/src/push/sdk/tpns-server-sdk-go/go/def.go
    • Line 3: warning: exported type CommonRspEnv should have comment or be unexported (golint)
    • Line 6: warning: comment on exported const EnvProd should be of the form "EnvProd ..." (golint)
    • Line 8: warning: comment on exported const EnvDev should be of the form "EnvDev ..." (golint)
    • Line 12: warning: exported type CommonRsp should have comment or be unexported (golint)
    • Line 27: warning: exported type AudienceType should have comment or be unexported (golint)
    • Line 30: warning: exported const AdAll should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: exported const MsgTypeNotify should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported type Request should have comment or be unexported (golint)
    • Line 95: warning: exported type TagListOperation should have comment or be unexported (golint)
    • Line 97: warning: exported type ChannelDistributeRule should have comment or be unexported (golint)
    • Line 102: warning: exported type PushLoopParam should have comment or be unexported (golint)
    • Line 114: warning: exported type PushLoopType should have comment or be unexported (golint)
    • Line 117: warning: exported const TagListOpAnd should have comment (or a comment on this block) or be unexported (golint)
    • Line 122: warning: exported type TagType should have comment or be unexported (golint)
    • Line 125: warning: exported const XGAutoProvince should have comment (or a comment on this block) or be unexported (golint)
    • Line 135: warning: exported type TagRule should have comment or be unexported (golint)
    • Line 143: warning: exported type TagItem should have comment or be unexported (golint)
    • Line 152: warning: exported type Message should have comment or be unexported (golint)
    • Line 171: warning: exported type AcceptTimeItem should have comment or be unexported (golint)
    • Line 176: warning: exported type HourAndMin should have comment or be unexported (golint)
    • Line 181: warning: exported type AndroidParams should have comment or be unexported (golint)
    • Line 225: warning: exported type Action should have comment or be unexported (golint)
    • Line 233: warning: exported type Browser should have comment or be unexported (golint)
    • Line 238: warning: exported type AtyAttr should have comment or be unexported (golint)
    • Line 243: warning: exported type IOSParams should have comment or be unexported (golint)
    • Line 249: warning: exported type Aps should have comment or be unexported (golint)
    • Open-IM-Server/src/utils/platform_number_id_to_name.go
    • Line 7: warning: comment on exported const IOSPlatformID should be of the form "IOSPlatformID ..." (golint)
    • Line 9: warning: exported const AndroidPlatformID should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: comment on exported const IOSPlatformStr should be of the form "IOSPlatformStr ..." (golint)
    • Line 25: warning: comment on exported const TerminalPC should be of the form "TerminalPC ..." (golint)
    • Line 30: warning: exported var PlatformID2Name should have comment or be unexported (golint)
    • Line 39: warning: exported var PlatformName2ID should have comment or be unexported (golint)
    • Line 48: warning: exported var Platform2class should have comment or be unexported (golint)
    • Line 58: warning: exported function PlatformIDToName should have comment or be unexported (golint)
    • Line 61: warning: exported function PlatformNameToID should have comment or be unexported (golint)
    • Line 64: warning: exported function PlatformNameToClass should have comment or be unexported (golint)
    • Open-IM-Server/src/msg_gateway/gate/ws_server.go
    • Line 12: warning: exported type WServer should have comment or be unexported (golint)
    • Line 48: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 65: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Open-IM-Server/src/common/log/time_format.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 15: warning: exported const TimeOffset should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: comment on exported function GetCurrentTimestamp should be of the form "GetCurrentTimestamp ..." (golint)
    • Line 24: warning: comment on exported function GetCurDayZeroTimestamp should be of the form "GetCurDayZeroTimestamp ..." (golint)
    • Line 31: warning: comment on exported function GetCurDayHalfTimestamp should be of the form "GetCurDayHalfTimestamp ..." (golint)
    • Line 37: warning: comment on exported function GetCurDayZeroTimeFormat should be of the form "GetCurDayZeroTimeFormat ..." (golint)
    • Line 42: warning: comment on exported function GetCurDayHalfTimeFormat should be of the form "GetCurDayHalfTimeFormat ..." (golint)
    • Line 46: warning: exported function GetTimeStampByFormat should have comment or be unexported (golint)
    • Line 54: warning: exported function TimeStringFormatTimeUnix should have comment or be unexported (golint)
    • Open-IM-Server/src/msg_transfer/logic/history_msg_handler.go
    • Line 20: warning: exported type HistoryConsumerHandler should have comment or be unexported (golint)
    • Line 25: warning: exported method HistoryConsumerHandler.Init should have comment or be unexported (golint)
    • Line 105: warning: exported method HistoryConsumerHandler.Setup should have comment or be unexported (golint)
    • Line 106: warning: exported method HistoryConsumerHandler.Cleanup should have comment or be unexported (golint)
    • Line 107: warning: exported method HistoryConsumerHandler.ConsumeClaim should have comment or be unexported (golint)
    • Open-IM-Server/src/common/db/mysql_model/im_mysql_model/user_model.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 26: warning: exported function UserRegister should have comment or be unexported (golint)
    • Line 49: warning: exported function UserDelete should have comment or be unexported (golint)
    • Line 60: warning: exported function FindUserByUID should have comment or be unexported (golint)
    • Line 73: warning: exported function UpDateUserInfo should have comment or be unexported (golint)
    • Line 116: warning: exported function SelectAllUID should have comment or be unexported (golint)
    • Line 133: warning: exported function IsExistUser should have comment or be unexported (golint)
    • Open-IM-Server/src/common/db/mysql_model/im_mysql_model/friend_model.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 5: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 9: warning: exported function InsertToFriend should have comment or be unexported (golint)
    • Line 27: warning: exported function FindFriendRelationshipFromFriend should have comment or be unexported (golint)
    • Line 40: warning: exported function FindUserInfoFromFriend should have comment or be unexported (golint)
    • Line 53: warning: exported function UpdateFriendComment should have comment or be unexported (golint)
    • Line 62: warning: exported function DeleteSingleFriendInfo should have comment or be unexported (golint)
    • Open-IM-Server/src/utils/strings.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 15: warning: exported function IntToString should have comment or be unexported (golint)
    • Line 19: warning: exported function StringToInt should have comment or be unexported (golint)
    • Line 23: warning: exported function StringToInt64 should have comment or be unexported (golint)
    • Line 28: warning: comment on exported function IsContain should be of the form "IsContain ..." (golint)
    • Line 40: warning: exported function InterfaceArrayToStringArray should have comment or be unexported (golint)
    • Line 46: warning: exported function StructToJsonString should have comment or be unexported (golint)
    • Line 52: warning: comment on exported function JsonStringToStruct should be of the form "JsonStringToStruct ..." (golint)
    • Line 58: warning: exported function GetMsgID should have comment or be unexported (golint)
    • Open-IM-Server/src/grpc-etcdv3/getcdv3/register.go
    • Line 12: warning: exported type RegEtcd should have comment or be unexported (golint)
    • Line 21: warning: comment on exported function GetPrefix should be of the form "GetPrefix ..." (golint)
    • Line 26: warning: comment on exported function GetPrefix4Unique should be of the form "GetPrefix4Unique ..." (golint)
    • Line 31: warning: comment on exported function RegisterEtcd4Unique should be of the form "RegisterEtcd4Unique ..." (golint)
    • Line 37: warning: comment on exported function RegisterEtcd should be of the form "RegisterEtcd ..." (golint)
    • Line 91: warning: exported function UnRegisterEtcd should have comment or be unexported (golint)
    • Open-IM-Server/src/common/db/mongoModel.go
    • Line 16: warning: exported type MsgInfo should have comment or be unexported (golint)
    • Line 21: warning: exported type UserChat should have comment or be unexported (golint)
    • Line 26: warning: exported type GroupMember should have comment or be unexported (golint)
    • Line 31: warning: exported method DataBases.GetUserChat should have comment or be unexported (golint)
    • Line 85: warning: exported method DataBases.SaveUserChat should have comment or be unexported (golint)
    • Line 124: warning: exported method DataBases.DelUserChat should have comment or be unexported (golint)
    • Line 141: warning: exported method DataBases.MgoUserCount should have comment or be unexported (golint)
    • Line 153: warning: exported method DataBases.MgoSkipUID should have comment or be unexported (golint)
    • Line 167: warning: exported method DataBases.GetGroupMember should have comment or be unexported (golint)
    • Line 187: warning: exported method DataBases.AddGroupMember should have comment or be unexported (golint)
    • Line 219: warning: exported method DataBases.DelGroupMember should have comment or be unexported (golint)
    • Open-IM-Server/src/api/manage/management_chat.go
    • Line 1: warning: package comment should be of the form "Package manage ..." (golint)
    • Line 75: warning: exported function ManagementSendMsg should have comment or be unexported (golint)
    • Line 134: warning: exported type PictureBaseInfo should have comment or be unexported (golint)
    • Line 143: warning: exported type PictureElem should have comment or be unexported (golint)
    • Line 149: warning: exported type SoundElem should have comment or be unexported (golint)
    • Line 156: warning: exported type VideoElem should have comment or be unexported (golint)
    • Line 170: warning: exported type FileElem should have comment or be unexported (golint)
    • Line 178: warning: comment on exported type AtElem should be of the form "AtElem ..." (with optional leading article) (golint)
    • Line 188: warning: exported type LocationElem should have comment or be unexported (golint)
    • Line 193: warning: exported type CustomElem should have comment or be unexported (golint)
    • Line 198: warning: exported type TextElem should have comment or be unexported (golint)
    • Open-IM-Server/src/common/db/mysql_model/im_mysql_model/model_struct.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 5: warning: exported type User should have comment or be unexported (golint)
    • Line 17: warning: exported type Friend should have comment or be unexported (golint)
    • Line 24: warning: exported type FriendRequest should have comment or be unexported (golint)
    • Line 31: warning: exported type BlackList should have comment or be unexported (golint)
    • Line 37: warning: exported type Group should have comment or be unexported (golint)
    • Line 47: warning: exported type GroupMember should have comment or be unexported (golint)
    • Line 56: warning: exported type GroupRequest should have comment or be unexported (golint)
    • Open-IM-Server/src/common/constant/constant.go
    • Line 5: warning: comment on exported const OrdinaryMember should be of the form "OrdinaryMember ..." (golint)
    • Line 7: warning: exported const GroupOwner should have comment (or a comment on this block) or be unexported (golint)
    • Line 9: warning: comment on exported const Application should be of the form "Application ..." (golint)
    • Line 13: warning: comment on exported const BlackListFlag should be of the form "BlackListFlag ..." (golint)
    • Line 19: warning: comment on exported const WSGetNewestSeq should be of the form "WSGetNewestSeq ..." (golint)
    • Line 25: warning: comment on exported const Text should be of the form "Text ..." (golint)
    • Line 36: warning: comment on exported const AcceptFriendApplicationTip should be of the form "AcceptFriendApplicationTip ..." (golint)
    • Line 57: warning: comment on exported const UserMsgType should be of the form "UserMsgType ..." (golint)
    • Line 61: warning: comment on exported const SingleChatType should be of the form "SingleChatType ..." (golint)
    • Line 66: warning: exported var ContentType2PushContent should have comment or be unexported (golint)
    • Line 73: warning: exported const FriendAcceptTip should have comment or be unexported (golint)
    • Open-IM-Server/src/msg_transfer/logic/persistent_msg_handler.go
    • Line 1: warning: package comment should be of the form "Package logic ..." (golint)
    • Line 22: warning: exported type PersistentConsumerHandler should have comment or be unexported (golint)
    • Line 27: warning: exported method PersistentConsumerHandler.Init should have comment or be unexported (golint)
    • Line 65: warning: exported method PersistentConsumerHandler.Setup should have comment or be unexported (golint)
    • Line 66: warning: exported method PersistentConsumerHandler.Cleanup should have comment or be unexported (golint)
    • Line 67: warning: exported method PersistentConsumerHandler.ConsumeClaim should have comment or be unexported (golint)
    • Open-IM-Server/src/push/logic/push_to_client.go
    • Line 1: warning: package comment should be of the form "Package logic ..." (golint)
    • Line 27: warning: exported type EChatContent should have comment or be unexported (golint)
    • Line 34: warning: exported function MsgToUser should have comment or be unexported (golint)
    • Line 109: warning: exported function SendMsgByWS should have comment or be unexported (golint)
    • Open-IM-Server/src/common/db/mysql_model/im_mysql_model/group_request_model.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 8: warning: exported function InsertIntoGroupRequest should have comment or be unexported (golint)
    • Line 21: warning: exported function FindGroupRequestUserInfoByGroupIDAndUid should have comment or be unexported (golint)
    • Line 34: warning: exported function DelGroupRequest should have comment or be unexported (golint)
    • Line 46: warning: exported function FindGroupBeInvitedRequestInfoByUidAndGroupID should have comment or be unexported (golint)
    • Line 60: warning: exported function InsertGroupRequest should have comment or be unexported (golint)
    • Open-IM-Server/src/common/db/mysql_model/im_mysql_model/group_model.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 11: warning: exported function InsertIntoGroup should have comment or be unexported (golint)
    • Line 28: warning: exported function FindGroupInfoByGroupId should have comment or be unexported (golint)
    • Line 41: warning: exported function SetGroupInfo should have comment or be unexported (golint)
    • Line 75: warning: exported function GetGroupApplicationList should have comment or be unexported (golint)
    • Line 167: warning: exported function TransferGroupOwner should have comment or be unexported (golint)
    • Line 193: warning: exported function GroupApplicationResponse should have comment or be unexported (golint)
    • Open-IM-Server/src/common/log/logrus.go
    • Line 17: warning: exported type Logger should have comment or be unexported (golint)
    • Line 26: warning: exported function NewPrivateLog should have comment or be unexported (golint)
    • Line 62: warning: exported function NewLfsHook should have comment or be unexported (golint)
    • Line 91: warning: comment on exported function Info should be of the form "Info ..." (golint)
    • Line 100: warning: comment on exported function Error should be of the form "Error ..." (golint)
    • Line 110: warning: comment on exported function Debug should be of the form "Debug ..." (golint)
    • Line 120: warning: comment on exported function Warning should be of the form "Warning ..." (golint)
    • Line 129: warning: comment on exported function InfoByArgs should be of the form "InfoByArgs ..." (golint)
    • Line 134: warning: comment on exported function ErrorByArgs should be of the form "ErrorByArgs ..." (golint)
    • Line 139: warning: comment on exported function InfoByKv should be of the form "InfoByKv ..." (golint)
    • Line 149: warning: comment on exported function ErrorByKv should be of the form "ErrorByKv ..." (golint)
    • Line 156: warning: comment on exported function DebugByKv should be of the form "DebugByKv ..." (golint)
    • Line 163: warning: comment on exported function WarnByKv should be of the form "WarnByKv ..." (golint)
    • Line 182: warning: exported function NewInfo should have comment or be unexported (golint)
    • Line 188: warning: exported function NewError should have comment or be unexported (golint)
    • Line 194: warning: exported function NewDebug should have comment or be unexported (golint)
    • Line 200: warning: exported function NewWarn should have comment or be unexported (golint)
    • Open-IM-Server/src/timed_task/timed_task/init.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 3: warning: exported type TimeTask should have comment or be unexported (golint)
    • Line 9: warning: exported function GetInstance should have comment or be unexported (golint)
    • Line 19: warning: exported method TimeTask.Run should have comment or be unexported (golint)
    • Open-IM-Server/src/push/logic/init.go
    • Line 1: warning: package comment should be of the form "Package logic ..." (golint)
    • Line 23: warning: exported function Init should have comment or be unexported (golint)
    • Line 33: warning: exported function Run should have comment or be unexported (golint)
    • Open-IM-Server/src/common/db/mysql_model/im_mysql_model/group_member_model.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 8: warning: exported function InsertIntoGroupMember should have comment or be unexported (golint)
    • Line 21: warning: exported function FindGroupMemberListByUserId should have comment or be unexported (golint)
    • Line 34: warning: exported function FindGroupMemberListByGroupId should have comment or be unexported (golint)
    • Line 47: warning: exported function FindGroupMemberListByGroupIdAndFilterInfo should have comment or be unexported (golint)
    • Line 60: warning: exported function FindGroupMemberInfoByGroupIdAndUserId should have comment or be unexported (golint)
    • Line 73: warning: exported function DeleteGroupMemberByGroupIdAndUserId should have comment or be unexported (golint)
    • Line 85: warning: exported function UpdateOwnerGroupNickName should have comment or be unexported (golint)
    • Line 97: warning: exported function SelectGroupList should have comment or be unexported (golint)
    • Line 117: warning: exported function UpdateTheUserAdministratorLevel should have comment or be unexported (golint)
    • Line 129: warning: exported function GetOwnerManagerByGroupId should have comment or be unexported (golint)
    • Line 142: warning: exported function IsExistGroupMember should have comment or be unexported (golint)
    • Line 159: warning: exported function RemoveGroupMember should have comment or be unexported (golint)
    • Line 163: warning: exported function GetMemberInfoById should have comment or be unexported (golint)
    • Line 167: warning: exported function GetGroupMemberByGroupId should have comment or be unexported (golint)
    • Line 185: warning: exported function GetJoinedGroupIdListByMemberId should have comment or be unexported (golint)
    • Line 189: warning: exported function GetGroupMemberNumByGroupId should have comment or be unexported (golint)
    • Line 202: warning: exported function GetGroupOwnerByGroupId should have comment or be unexported (golint)
    • Line 215: warning: exported function InsertGroupMember should have comment or be unexported (golint)
    • Open-IM-Server/src/api/group/group.go
    • Line 15: warning: exported type InviteUserToGroupReq should have comment or be unexported (golint)
    • Line 22: warning: exported type GetJoinedGroupListReq should have comment or be unexported (golint)
    • Line 26: warning: exported type KickGroupMemberReq should have comment or be unexported (golint)
    • Line 33: warning: exported function KickGroupMember should have comment or be unexported (golint)
    • Line 78: warning: exported type GetGroupMembersInfoReq should have comment or be unexported (golint)
    • Line 83: warning: exported type GetGroupMembersInfoResp should have comment or be unexported (golint)
    • Line 89: warning: exported function GetGroupMembersInfo should have comment or be unexported (golint)
    • Line 131: warning: exported type GetGroupMemberListReq should have comment or be unexported (golint)
    • Line 142: warning: exported type MemberResult should have comment or be unexported (golint)
    • Line 151: warning: exported function GetGroupMemberList should have comment or be unexported (golint)
    • Line 201: warning: exported function GetGroupAllMember should have comment or be unexported (golint)
    • Line 257: warning: exported function GetJoinedGroupList should have comment or be unexported (golint)
    • Line 305: warning: exported type Id2Result should have comment or be unexported (golint)
    • Line 310: warning: exported function InviteUserToGroup should have comment or be unexported (golint)
    • Open-IM-Server/src/utils/map.go
    • Line 8: warning: exported type Map should have comment or be unexported (golint)
    • Line 19: warning: exported method Map.UnsafeGet should have comment or be unexported (golint)
    • Line 22: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 27: warning: exported method Map.Get should have comment or be unexported (golint)
    • Line 33: warning: exported method Map.UnsafeSet should have comment or be unexported (golint)
    • Line 38: warning: exported method Map.Set should have comment or be unexported (golint)
    • Line 44: warning: exported method Map.TestAndSet should have comment or be unexported (golint)
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 58: warning: exported method Map.UnsafeDel should have comment or be unexported (golint)
    • Line 63: warning: exported method Map.Del should have comment or be unexported (golint)
    • Line 69: warning: exported method Map.UnsafeLen should have comment or be unexported (golint)
    • Line 72: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 77: warning: exported method Map.Len should have comment or be unexported (golint)
    • Line 83: warning: exported method Map.UnsafeRange should have comment or be unexported (golint)
    • Line 92: warning: exported method Map.RLockRange should have comment or be unexported (golint)
    • Line 98: warning: exported method Map.LockRange should have comment or be unexported (golint)
    • Line 104: warning: exported function MapToJsonString should have comment or be unexported (golint)
    • Line 109: warning: exported function JsonStringToMap should have comment or be unexported (golint)
    • Line 113: warning: exported function GetSwitchFromOptions should have comment or be unexported (golint)
    • Open-IM-Server/src/grpc-etcdv3/getcdv3/resolver.go
    • Line 17: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 32: warning: exported function NewResolver should have comment or be unexported (golint)
    • Line 59: warning: exported method Resolver.ResolveNow should have comment or be unexported (golint)
    • Line 62: warning: exported method Resolver.Close should have comment or be unexported (golint)
    • Line 65: warning: exported function GetConn should have comment or be unexported (golint)
    • Line 91: warning: exported method Resolver.Build should have comment or be unexported (golint)
    • Line 91: warning: receiver name r should be consistent with previous receiver name r1 for Resolver (golint)
    • Line 118: warning: exported method Resolver.Scheme should have comment or be unexported (golint)
    • Line 118: warning: receiver name r should be consistent with previous receiver name r1 for Resolver (golint)
    • Line 141: warning: receiver name r should be consistent with previous receiver name r1 for Resolver (golint)
    • Line 176: warning: exported function GetConn4Unique should have comment or be unexported (golint)
    • Line 222: warning: exported function GetconnFactory should have comment or be unexported (golint)
    • Line 226: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 231: warning: exported function GetConnPool should have comment or be unexported (golint)
    • Line 244: warning: exported function NewPool should have comment or be unexported (golint)
    • Line 260: warning: exported function GetGrpcConn should have comment or be unexported (golint)
    • Open-IM-Server/src/push/content_struct/content.go
    • Line 1: warning: package comment should be of the form "Package content_struct ..." (golint)
    • Line 7: warning: don't use an underscore in package name (golint)
    • Line 13: warning: exported type Content should have comment or be unexported (golint)
    • Line 19: warning: exported function NewContentStructString should have comment or be unexported (golint)
    • Line 39: warning: exported type AgreeOrRejectGroupMember should have comment or be unexported (golint)
    • Line 48: warning: exported type AtTextContent should have comment or be unexported (golint)
    • Line 54: warning: exported type CreateGroupSysMsg should have comment or be unexported (golint)
    • Line 61: warning: exported type NotificationContent should have comment or be unexported (golint)
    • Line 67: warning: exported method NotificationContent.ContentToString should have comment or be unexported (golint)
    • Line 73: warning: exported type KickGroupMemberApiReq should have comment or be unexported (golint)
    • Line 80: warning: exported function NewCreateGroupSysMsgString should have comment or be unexported (golint)
    • Open-IM-Server/src/push/logic/push_handler.go
    • Line 1: warning: package comment should be of the form "Package logic ..." (golint)
    • Line 21: warning: exported type PushConsumerHandler should have comment or be unexported (golint)
    • Line 26: warning: exported method PushConsumerHandler.Init should have comment or be unexported (golint)
    • Line 58: warning: exported method PushConsumerHandler.Setup should have comment or be unexported (golint)
    • Line 59: warning: exported method PushConsumerHandler.Cleanup should have comment or be unexported (golint)
    • Line 60: warning: exported method PushConsumerHandler.ConsumeClaim should have comment or be unexported (golint)
    • Open-IM-Server/src/common/db/mysql_model/im_mysql_model/friend_request_model.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 8: warning: exported function ReplaceIntoFriendReq should have comment or be unexported (golint)
    • Line 20: warning: exported function FindFriendsApplyFromFriendReq should have comment or be unexported (golint)
    • Line 34: warning: exported function FindSelfApplyFromFriendReq should have comment or be unexported (golint)
    • Line 47: warning: exported function FindFriendApplyFromFriendReqByUid should have comment or be unexported (golint)
    • Line 60: warning: exported function UpdateFriendRelationshipToFriendReq should have comment or be unexported (golint)
    • Open-IM-Server/src/rpc/chat/chat/send_msg.go
    • Line 1: warning: don't use MixedCaps in package name; rpcChat should be rpcchat (golint)
    • Line 23: warning: exported type MsgCallBackReq should have comment or be unexported (golint)
    • Line 33: warning: exported type MsgCallBackResp should have comment or be unexported (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 128: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 172: warning: exported function GetMsgID should have comment or be unexported (golint)
    • Open-IM-Server/src/common/kafka/consumer_group.go
    • Line 1: warning: package comment should be of the form "Package kafka ..." (golint)
    • Line 14: warning: exported type MConsumerGroup should have comment or be unexported (golint)
    • Line 20: warning: exported type MConsumerGroupConfig should have comment or be unexported (golint)
    • Line 26: warning: exported function NewMConsumerGroup should have comment or be unexported (golint)
    • Line 45: warning: exported method MConsumerGroup.RegisterHandleAndConsumer should have comment or be unexported (golint)
    • Open-IM-Server/src/utils/jwt_token.go
    • Line 12: warning: error var TokenExpired should have name of the form ErrFoo (golint)
    • Line 12: warning: exported var TokenExpired should have comment or be unexported (golint)
    • Line 13: warning: error var TokenInvalid should have name of the form ErrFoo (golint)
    • Line 14: warning: error var TokenNotValidYet should have name of the form ErrFoo (golint)
    • Line 15: warning: error var TokenMalformed should have name of the form ErrFoo (golint)
    • Line 16: warning: error var TokenUnknown should have name of the form ErrFoo (golint)
    • Line 19: warning: exported type Claims should have comment or be unexported (golint)
    • Line 25: warning: exported function BuildClaims should have comment or be unexported (golint)
    • Line 37: warning: exported function CreateToken should have comment or be unexported (golint)
    • Line 72: warning: exported function ParseToken should have comment or be unexported (golint)
    • Line 126: warning: exported function MakeTheTokenInvalid should have comment or be unexported (golint)
    • Line 142: warning: exported function ParseRedisInterfaceToken should have comment or be unexported (golint)
    • Line 146: warning: comment on exported function VerifyToken should be of the form "VerifyToken ..." (golint)
    • Open-IM-Server/src/utils/time_format.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 15: warning: exported const TimeOffset should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: comment on exported function GetCurrentTimestampBySecond should be of the form "GetCurrentTimestampBySecond ..." (golint)
    • Line 24: warning: comment on exported function UnixSecondToTime should be of the form "UnixSecondToTime ..." (golint)
    • Line 29: warning: comment on exported function UnixNanoSecondToTime should be of the form "UnixNanoSecondToTime ..." (golint)
    • Line 34: warning: comment on exported function GetCurrentTimestampByNano should be of the form "GetCurrentTimestampByNano ..." (golint)
    • Line 39: warning: comment on exported function GetCurrentTimestampByMill should be of the form "GetCurrentTimestampByMill ..." (golint)
    • Line 44: warning: comment on exported function GetCurDayZeroTimestamp should be of the form "GetCurDayZeroTimestamp ..." (golint)
    • Line 51: warning: comment on exported function GetCurDayHalfTimestamp should be of the form "GetCurDayHalfTimestamp ..." (golint)
    • Line 57: warning: comment on exported function GetCurDayZeroTimeFormat should be of the form "GetCurDayZeroTimeFormat ..." (golint)
    • Line 62: warning: comment on exported function GetCurDayHalfTimeFormat should be of the form "GetCurDayHalfTimeFormat ..." (golint)
    • Line 66: warning: exported function GetTimeStampByFormat should have comment or be unexported (golint)
    • Line 74: warning: exported function TimeStringFormatTimeUnix should have comment or be unexported (golint)
    • Open-IM-Server/src/common/db/redisModel.go
    • Line 14: warning: exported method DataBases.Exec should have comment or be unexported (golint)
    • Line 34: warning: comment on exported method DataBases.IncrUserSeq should be of the form "IncrUserSeq ..." (golint)
    • Line 40: warning: comment on exported method DataBases.GetUserSeq should be of the form "GetUserSeq ..." (golint)
    • Line 46: warning: comment on exported method DataBases.SetAppleDeviceToken should be of the form "SetAppleDeviceToken ..." (golint)
    • Line 53: warning: comment on exported method DataBases.DelAppleDeviceToken should be of the form "DelAppleDeviceToken ..." (golint)
    • Line 60: warning: comment on exported method DataBases.SetLastGetSeq should be of the form "SetLastGetSeq ..." (golint)
    • Line 67: warning: comment on exported method DataBases.GetLastGetSeq should be of the form "GetLastGetSeq ..." (golint)
    • Line 73: warning: comment on exported method DataBases.SetUserIDAndPlatform should be of the form "SetUserIDAndPlatform ..." (golint)
    • Line 80: warning: comment on exported method DataBases.ExistsUserIDAndPlatform should be of the form "ExistsUserIDAndPlatform ..." (golint)
    • Line 87: warning: comment on exported method DataBases.GetPlatformToken should be of the form "GetPlatformToken ..." (golint)
    • Open-IM-Server/src/push/sdk/tpns-server-sdk-go/go/req/req.go
    • Line 14: warning: exported var PushURL should have comment or be unexported (golint)
    • Line 18: warning: exported function URL should have comment or be unexported (golint)
    • Line 22: warning: exported type ReqOpt should have comment or be unexported (golint)
    • Line 24: warning: exported function NewPush should have comment or be unexported (golint)
    • Line 28: warning: exported function NewUploadFileRequest should have comment or be unexported (golint)
    • Line 54: warning: exported function NewSingleAccountPush should have comment or be unexported (golint)
    • Line 68: warning: exported function NewListAccountPush should have comment or be unexported (golint)
    • Line 82: warning: exported function NewTokenPush should have comment or be unexported (golint)
    • Line 98: warning: exported function NewTagsPush should have comment or be unexported (golint)
    • Line 113: warning: exported function NewAllPush should have comment or be unexported (golint)
    • Line 125: warning: exported function NewAccountPackagePush should have comment or be unexported (golint)
    • Line 137: warning: exported function NewTokenPackagePush should have comment or be unexported (golint)
    • Line 149: warning: exported function NewPushReq should have comment or be unexported (golint)
    • Line 167: warning: exported function EnvProd should have comment or be unexported (golint)
    • Line 173: warning: exported function EnvDev should have comment or be unexported (golint)
    • Line 179: warning: exported function Title should have comment or be unexported (golint)
    • Line 200: warning: exported function Content should have comment or be unexported (golint)
    • Line 221: warning: exported function Ring should have comment or be unexported (golint)
    • Line 227: warning: exported function RingRaw should have comment or be unexported (golint)
    • Line 233: warning: exported function Vibrate should have comment or be unexported (golint)
    • Line 239: warning: exported function Lights should have comment or be unexported (golint)
    • Line 245: warning: exported function Clearable should have comment or be unexported (golint)
    • Line 251: warning: exported function IconType should have comment or be unexported (golint)
    • Line 257: warning: exported function IconRes should have comment or be unexported (golint)
    • Line 263: warning: exported function AndroidCustomContent should have comment or be unexported (golint)
    • Line 269: warning: exported function Aps should have comment or be unexported (golint)
    • Line 275: warning: exported function AudienceType should have comment or be unexported (golint)
    • Line 281: warning: exported function Message should have comment or be unexported (golint)
    • Line 287: warning: exported function TokenList should have comment or be unexported (golint)
    • Line 293: warning: exported function TokenListAdd should have comment or be unexported (golint)
    • Line 303: warning: exported function AccountList should have comment or be unexported (golint)
    • Line 309: warning: comment on exported function AddChannelRules should be of the form "AddChannelRules ..." (golint)
    • Line 316: warning: comment on exported function AddLoopParam should be of the form "AddLoopParam ..." (golint)
    • Line 323: warning: exported function AccountListAdd should have comment or be unexported (golint)
    • Line 333: warning: exported function MessageType should have comment or be unexported (golint)
    • Line 339: warning: exported function AddMultiPkg should have comment or be unexported (golint)
    • Line 345: warning: exported function AddForceCollapse should have comment or be unexported (golint)
    • Line 351: warning: exported function AddTPNSOnlinePushType should have comment or be unexported (golint)
    • Line 357: warning: exported function AddCollapseId should have comment or be unexported (golint)
    • Line 363: warning: exported function AddPushSpeed should have comment or be unexported (golint)
    • Line 369: warning: exported function AddAccountPushType should have comment or be unexported (golint)
    • Line 375: warning: exported function AddPlanId should have comment or be unexported (golint)
    • Line 381: warning: exported function AddSendTime should have comment or be unexported (golint)
    • Line 387: warning: exported function AddExpireTime should have comment or be unexported (golint)
    • Line 393: warning: exported function AddUploadId should have comment or be unexported (golint)
    • Line 399: warning: exported function AddEnvironment should have comment or be unexported (golint)
    • Open-IM-Server/src/common/kafka/producer.go
    • Line 9: warning: exported type Producer should have comment or be unexported (golint)
    • Line 16: warning: exported function NewKafkaProducer should have comment or be unexported (golint)
    • Line 35: warning: exported method Producer.SendMessage should have comment or be unexported (golint)
    • Open-IM-Server/src/utils/file.go
    • Line 5: warning: comment on exported function IsDir should be of the form "IsDir ..." (golint)
    • Line 14: warning: comment on exported function IsFile should be of the form "IsFile ..." (golint)
    • Line 19: warning: comment on exported function MkDir should be of the form "MkDir ..." (golint)
    • Open-IM-Server/src/msg_gateway/gate/validate.go
    • Line 1: warning: package comment should be of the form "Package gate ..." (golint)
    • Line 15: warning: exported type Req should have comment or be unexported (golint)
    • Line 23: warning: exported type SeqData should have comment or be unexported (golint)
    • Line 27: warning: exported type MsgData should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words