Preparing report...

Report for github.com/madneal/gshark

A    Great!    Found 193 issues across 204 files

Tweet

gofmt90%

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!


gocyclo99%

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.


golint6%

Golint is a linter for Go source code.

    • gshark/server/initialize/router.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 17: warning: exported function Routers should have comment or be unexported (golint)
    • gshark/server/model/token.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 9: warning: comment on exported type Token should be of the form "Token ..." (with optional leading article) (golint)
    • Line 20: warning: exported method Token.TableName should have comment or be unexported (golint)
    • gshark/server/service/sys_api.go
    • Line 17: warning: exported function CreateApi should have comment or be unexported (golint)
    • Line 30: warning: exported function DeleteApi should have comment or be unexported (golint)
    • Line 42: warning: error should be the last type when returning multiple items (golint)
    • Line 42: warning: exported function GetAPIInfoList should have comment or be unexported (golint)
    • Line 68: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 90: warning: error should be the last type when returning multiple items (golint)
    • Line 90: warning: exported function GetAllApis should have comment or be unexported (golint)
    • Line 101: warning: error should be the last type when returning multiple items (golint)
    • Line 101: warning: exported function GetApiById should have comment or be unexported (golint)
    • Line 112: warning: exported function UpdateApi should have comment or be unexported (golint)
    • Line 122: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 126: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gshark/server/api/v1/sys_casbin.go
    • Line 13: warning: comment on exported function UpdateCasbin should be of the form "UpdateCasbin ..." (golint)
    • Line 36: warning: comment on exported function GetPolicyPathByAuthorityId should be of the form "GetPolicyPathByAuthorityId ..." (golint)
    • gshark/server/model/filter.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 8: warning: comment on exported type Filter should be of the form "Filter ..." (with optional leading article) (golint)
    • Line 16: warning: error should be the last type when returning multiple items (golint)
    • Line 16: warning: exported function GetFilterRule should have comment or be unexported (golint)
    • gshark/server/core/viper.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 16: warning: exported function Viper should have comment or be unexported (golint)
    • gshark/server/api/v1/repo.go
    • Line 13: warning: comment on exported function CreateRepo should be of the form "CreateRepo ..." (golint)
    • Line 32: warning: comment on exported function DeleteRepo should be of the form "DeleteRepo ..." (golint)
    • Line 51: warning: comment on exported function DeleteRepoByIds should be of the form "DeleteRepoByIds ..." (golint)
    • Line 70: warning: comment on exported function UpdateRepo should be of the form "UpdateRepo ..." (golint)
    • Line 89: warning: comment on exported function FindRepo should be of the form "FindRepo ..." (golint)
    • Line 108: warning: comment on exported function GetRepoList should be of the form "GetRepoList ..." (golint)
    • gshark/server/utils/upload/aliyun_oss.go
    • Line 13: warning: exported type AliyunOSS should have comment or be unexported (golint)
    • Line 15: warning: exported method AliyunOSS.UploadFile should have comment or be unexported (golint)
    • Line 42: warning: exported method AliyunOSS.DeleteFile should have comment or be unexported (golint)
    • Line 60: warning: exported function NewBucket should have comment or be unexported (golint)
    • gshark/server/service/exa_breakpoint_continue.go
    • Line 16: warning: error should be the last type when returning multiple items (golint)
    • Line 16: warning: exported function FindOrCreateFile should have comment or be unexported (golint)
    • Line 38: warning: exported function CreateFileChunk should have comment or be unexported (golint)
    • Line 53: warning: exported function DeleteFileChunk should have comment or be unexported (golint)
    • gshark/server/middleware/jwt.go
    • Line 17: warning: exported function JWTAuth should have comment or be unexported (golint)
    • Line 71: warning: exported type JWT should have comment or be unexported (golint)
    • Line 76: warning: error var TokenExpired should have name of the form ErrFoo (golint)
    • Line 76: warning: exported var TokenExpired should have comment or be unexported (golint)
    • Line 77: warning: error var TokenNotValidYet should have name of the form ErrFoo (golint)
    • Line 78: warning: error var TokenMalformed should have name of the form ErrFoo (golint)
    • Line 79: warning: error var TokenInvalid should have name of the form ErrFoo (golint)
    • Line 82: warning: exported function NewJWT should have comment or be unexported (golint)
    • Line 88: warning: comment on exported method JWT.CreateToken should be of the form "CreateToken ..." (golint)
    • Line 94: warning: comment on exported method JWT.ParseToken should be of the form "ParseToken ..." (golint)
    • Line 119: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gshark/server/service/sys_base_menu.go
    • Line 16: warning: exported function DeleteBaseMenu should have comment or be unexported (golint)
    • Line 39: warning: exported function UpdateBaseMenu should have comment or be unexported (golint)
    • Line 67: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 93: warning: error should be the last type when returning multiple items (golint)
    • Line 93: warning: exported function GetBaseMenuById should have comment or be unexported (golint)
    • gshark/server/model/sys_auto_code.go
    • Line 5: warning: comment on exported type AutoCodeStruct should be of the form "AutoCodeStruct ..." (with optional leading article) (golint)
    • Line 17: warning: exported type Field should have comment or be unexported (golint)
    • Line 30: warning: error var AutoMoveErr should have name of the form ErrFoo (golint)
    • Line 30: warning: exported var AutoMoveErr should have comment or be unexported (golint)
    • gshark/server/search/gitlabsearch/search.go
    • Line 18: warning: exported function RunTask should have comment or be unexported (golint)
    • Line 24: warning: exported function GenerateSearchCodeTask should have comment or be unexported (golint)
    • Line 41: warning: exported function RunSearchTask should have comment or be unexported (golint)
    • Line 60: warning: exported function Search should have comment or be unexported (golint)
    • Line 73: warning: exported function SearchInsideProjects should have comment or be unexported (golint)
    • Line 84: warning: exported function SaveResult should have comment or be unexported (golint)
    • Line 104: warning: exported function SearchCode should have comment or be unexported (golint)
    • Line 157: warning: exported function ListValidProjects should have comment or be unexported (golint)
    • Line 173: warning: exported function GetClient should have comment or be unexported (golint)
    • gshark/server/service/token.go
    • Line 15: warning: exported function CreateToken should have comment or be unexported (golint)
    • Line 26: warning: exported function DeleteToken should have comment or be unexported (golint)
    • Line 37: warning: exported function DeleteTokenByIds should have comment or be unexported (golint)
    • Line 48: warning: exported function UpdateToken should have comment or be unexported (golint)
    • Line 53: warning: exported function UpdateTokenRate should have comment or be unexported (golint)
    • Line 64: warning: error should be the last type when returning multiple items (golint)
    • Line 64: warning: exported function GetToken should have comment or be unexported (golint)
    • Line 69: warning: error should be the last type when returning multiple items (golint)
    • Line 69: warning: exported function ListTokenByType should have comment or be unexported (golint)
    • Line 80: warning: error should be the last type when returning multiple items (golint)
    • Line 80: warning: exported function GetTokenInfoList should have comment or be unexported (golint)
    • gshark/server/model/searchResult.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 9: warning: comment on exported type SearchResult should be of the form "SearchResult ..." (with optional leading article) (golint)
    • Line 23: warning: exported type TextMatchesJson should have comment or be unexported (golint)
    • Line 37: warning: exported type Match should have comment or be unexported (golint)
    • Line 43: warning: exported method SearchResult.TableName should have comment or be unexported (golint)
    • gshark/server/core/zap.go
    • Line 15: warning: exported function Zap should have comment or be unexported (golint)
    • Line 99: warning: comment on exported function CustomTimeEncoder should be of the form "CustomTimeEncoder ..." (golint)
    • gshark/server/service/sys_operation_record.go
    • Line 15: warning: exported function CreateSysOperationRecord should have comment or be unexported (golint)
    • Line 27: warning: exported function DeleteSysOperationRecordByIds should have comment or be unexported (golint)
    • Line 38: warning: exported function DeleteSysOperationRecord should have comment or be unexported (golint)
    • Line 49: warning: error should be the last type when returning multiple items (golint)
    • Line 49: warning: exported function GetSysOperationRecord should have comment or be unexported (golint)
    • Line 61: warning: error should be the last type when returning multiple items (golint)
    • Line 61: warning: exported function GetSysOperationRecordInfoList should have comment or be unexported (golint)
    • gshark/server/api/v1/sys_user.go
    • Line 18: warning: comment on exported function Login should be of the form "Login ..." (golint)
    • Line 107: warning: comment on exported function Register should be of the form "Register ..." (golint)
    • Line 130: warning: comment on exported function ChangePassword should be of the form "ChangePassword ..." (golint)
    • Line 153: warning: comment on exported function GetUserList should be of the form "GetUserList ..." (golint)
    • Line 181: warning: comment on exported function SetUserAuthority should be of the form "SetUserAuthority ..." (golint)
    • Line 204: warning: comment on exported function DeleteUser should be of the form "DeleteUser ..." (golint)
    • Line 232: warning: comment on exported function SetUserInfo should be of the form "SetUserInfo ..." (golint)
    • Line 260: 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 271: 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 282: 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)
    • gshark/server/utils/email.go
    • Line 20: warning: exported function Email should have comment or be unexported (golint)
    • Line 31: warning: exported function ErrorToEmail should have comment or be unexported (golint)
    • Line 45: warning: exported function EmailSend should have comment or be unexported (golint)
    • gshark/server/utils/md5.go
    • Line 16: warning: exported function MD5V should have comment or be unexported (golint)
    • Line 22: warning: exported function GenMd5 should have comment or be unexported (golint)
    • Line 26: warning: exported function GenMd5WithSpecificLen should have comment or be unexported (golint)
    • gshark/server/search/codesearch/search.go
    • Line 16: warning: exported function RunTask should have comment or be unexported (golint)
    • Line 22: warning: exported function GenerateSearchCodeTask should have comment or be unexported (golint)
    • Line 39: warning: exported function RunSearchTask should have comment or be unexported (golint)
    • Line 52: warning: exported function SaveResults should have comment or be unexported (golint)
    • Line 73: warning: exported function SearchForSearchCode should have comment or be unexported (golint)
    • Line 89: warning: exported function GetResult should have comment or be unexported (golint)
    • gshark/server/service/rule.go
    • Line 15: warning: exported function CreateRule should have comment or be unexported (golint)
    • Line 26: warning: exported function DeleteRule should have comment or be unexported (golint)
    • Line 37: warning: exported function DeleteRuleByIds should have comment or be unexported (golint)
    • Line 48: warning: exported function UpdateRule should have comment or be unexported (golint)
    • Line 59: warning: error should be the last type when returning multiple items (golint)
    • Line 59: warning: exported function GetRule should have comment or be unexported (golint)
    • Line 70: warning: error should be the last type when returning multiple items (golint)
    • Line 70: warning: exported function GetRuleInfoList should have comment or be unexported (golint)
    • Line 94: warning: error should be the last type when returning multiple items (golint)
    • Line 94: warning: exported function GetValidRulesByType should have comment or be unexported (golint)
    • gshark/server/api/v1/exa_breakpoint_continue.go
    • Line 14: warning: comment on exported function BreakpointContinue should be of the form "BreakpointContinue ..." (golint)
    • Line 68: warning: comment on exported function FindFile should be of the form "FindFile ..." (golint)
    • Line 89: warning: comment on exported function BreakpointContinueFinish should be of the form "BreakpointContinueFinish ..." (golint)
    • Line 109: warning: comment on exported function RemoveChunk should be of the form "RemoveChunk ..." (golint)
    • gshark/server/api/v1/sys_api.go
    • Line 14: warning: comment on exported function CreateApi should be of the form "CreateApi ..." (golint)
    • Line 37: warning: comment on exported function DeleteApi should be of the form "DeleteApi ..." (golint)
    • Line 60: warning: comment on exported function GetApiList should be of the form "GetApiList ..." (golint)
    • Line 88: warning: comment on exported function GetApiById should be of the form "GetApiById ..." (golint)
    • Line 112: warning: comment on exported function UpdateApi should be of the form "UpdateApi ..." (golint)
    • Line 135: warning: comment on exported function GetAllApis should be of the form "GetAllApis ..." (golint)
    • gshark/server/model/rule.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 8: warning: comment on exported type Rule should be of the form "Rule ..." (with optional leading article) (golint)
    • Line 18: warning: exported method Rule.TableName should have comment or be unexported (golint)
    • gshark/server/service/sys_authority.go
    • Line 19: warning: error should be the last type when returning multiple items (golint)
    • Line 19: warning: exported function CreateAuthority should have comment or be unexported (golint)
    • Line 34: warning: error should be the last type when returning multiple items (golint)
    • Line 34: warning: exported function CopyAuthority should have comment or be unexported (golint)
    • Line 64: warning: error should be the last type when returning multiple items (golint)
    • Line 64: warning: exported function UpdateAuthority should have comment or be unexported (golint)
    • Line 75: warning: exported function DeleteAuthority should have comment or be unexported (golint)
    • Line 100: warning: error should be the last type when returning multiple items (golint)
    • Line 100: warning: exported function GetAuthorityInfoList should have comment or be unexported (golint)
    • Line 120: warning: error should be the last type when returning multiple items (golint)
    • Line 120: warning: exported function GetAuthorityInfo should have comment or be unexported (golint)
    • Line 131: warning: exported function SetDataAuthority should have comment or be unexported (golint)
    • Line 144: warning: exported function SetMenuAuthority should have comment or be unexported (golint)
    • gshark/server/service/sys_menu.go
    • Line 18: warning: error should be the last type when returning multiple items (golint)
    • Line 34: warning: error should be the last type when returning multiple items (golint)
    • Line 34: warning: exported function GetMenuTree should have comment or be unexported (golint)
    • Line 62: warning: error should be the last type when returning multiple items (golint)
    • Line 62: warning: exported function GetInfoList should have comment or be unexported (golint)
    • Line 92: warning: exported function AddBaseMenu should have comment or be unexported (golint)
    • Line 104: warning: error should be the last type when returning multiple items (golint)
    • Line 119: warning: error should be the last type when returning multiple items (golint)
    • Line 119: warning: exported function GetBaseMenuTree should have comment or be unexported (golint)
    • Line 134: warning: exported function AddMenuAuthority should have comment or be unexported (golint)
    • Line 148: warning: error should be the last type when returning multiple items (golint)
    • Line 148: warning: exported function GetMenuAuthority should have comment or be unexported (golint)
    • gshark/server/model/sys_operation_record.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 9: warning: comment on exported type SysOperationRecord should be of the form "SysOperationRecord ..." (with optional leading article) (golint)
    • gshark/server/service/exa_file_upload_download.go
    • Line 19: warning: exported function Upload should have comment or be unexported (golint)
    • Line 29: warning: error should be the last type when returning multiple items (golint)
    • Line 29: warning: exported function FindFile should have comment or be unexported (golint)
    • Line 41: warning: exported function DeleteFile should have comment or be unexported (golint)
    • Line 58: warning: error should be the last type when returning multiple items (golint)
    • Line 58: warning: exported function GetFileRecordInfoList should have comment or be unexported (golint)
    • Line 74: warning: error should be the last type when returning multiple items (golint)
    • Line 74: warning: exported function UploadFile should have comment or be unexported (golint)
    • gshark/server/api/v1/sys_auto_code.go
    • Line 18: warning: comment on exported function PreviewTemp should be of the form "PreviewTemp ..." (golint)
    • Line 42: warning: comment on exported function CreateTemp should be of the form "CreateTemp ..." (golint)
    • Line 86: warning: comment on exported function GetTables should be of the form "GetTables ..." (golint)
    • Line 104: warning: comment on exported function GetDB should be of the form "GetDB ..." (golint)
    • Line 120: warning: comment on exported function GetColumn should be of the form "GetColumn ..." (golint)
    • gshark/server/model/request/sys_casbin.go
    • Line 3: warning: comment on exported type CasbinInfo should be of the form "CasbinInfo ..." (with optional leading article) (golint)
    • Line 9: warning: comment on exported type CasbinInReceive should be of the form "CasbinInReceive ..." (with optional leading article) (golint)
    • gshark/server/model/subdomain.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 8: warning: comment on exported type Subdomain should be of the form "Subdomain ..." (with optional leading article) (golint)
    • Line 16: warning: exported method Subdomain.TableName should have comment or be unexported (golint)
    • gshark/server/service/sys_user.go
    • Line 19: warning: error should be the last type when returning multiple items (golint)
    • Line 19: warning: exported function Register should have comment or be unexported (golint)
    • Line 37: warning: error should be the last type when returning multiple items (golint)
    • Line 37: warning: exported function Login should have comment or be unexported (golint)
    • Line 50: warning: error should be the last type when returning multiple items (golint)
    • Line 50: warning: exported function ChangePassword should have comment or be unexported (golint)
    • Line 64: warning: error should be the last type when returning multiple items (golint)
    • Line 64: warning: exported function GetUserInfoList should have comment or be unexported (golint)
    • Line 80: warning: exported function SetUserAuthority should have comment or be unexported (golint)
    • Line 91: warning: exported function DeleteUser should have comment or be unexported (golint)
    • Line 103: warning: error should be the last type when returning multiple items (golint)
    • Line 103: warning: exported function SetUserInfo should have comment or be unexported (golint)
    • Line 114: warning: error should be the last type when returning multiple items (golint)
    • Line 114: warning: exported function FindUserById should have comment or be unexported (golint)
    • Line 126: warning: error should be the last type when returning multiple items (golint)
    • Line 126: warning: exported function FindUserByUuid should have comment or be unexported (golint)
    • gshark/server/api/v1/sys_authority.go
    • Line 14: warning: comment on exported function CreateAuthority should be of the form "CreateAuthority ..." (golint)
    • Line 37: warning: comment on exported function CopyAuthority should be of the form "CopyAuthority ..." (golint)
    • Line 64: warning: comment on exported function DeleteAuthority should be of the form "DeleteAuthority ..." (golint)
    • Line 87: warning: comment on exported function UpdateAuthority should be of the form "UpdateAuthority ..." (golint)
    • Line 110: warning: comment on exported function GetAuthorityList should be of the form "GetAuthorityList ..." (golint)
    • Line 138: warning: comment on exported function SetDataAuthority should be of the form "SetDataAuthority ..." (golint)
    • gshark/server/api/v1/token.go
    • Line 13: warning: comment on exported function CreateToken should be of the form "CreateToken ..." (golint)
    • Line 32: warning: comment on exported function DeleteToken should be of the form "DeleteToken ..." (golint)
    • Line 51: warning: comment on exported function DeleteTokenByIds should be of the form "DeleteTokenByIds ..." (golint)
    • Line 70: warning: comment on exported function UpdateToken should be of the form "UpdateToken ..." (golint)
    • Line 89: warning: comment on exported function FindToken should be of the form "FindToken ..." (golint)
    • Line 108: warning: comment on exported function GetTokenList should be of the form "GetTokenList ..." (golint)
    • gshark/server/config/oss.go
    • Line 3: warning: exported type Local should have comment or be unexported (golint)
    • Line 7: warning: exported type Qiniu should have comment or be unexported (golint)
    • Line 17: warning: exported type AliyunOSS should have comment or be unexported (golint)
    • Line 24: warning: exported type TencentCOS should have comment or be unexported (golint)
    • gshark/server/model/repo.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 9: warning: comment on exported type Repo should be of the form "Repo ..." (with optional leading article) (golint)
    • Line 22: warning: exported method Repo.TableName should have comment or be unexported (golint)
    • gshark/server/search/githubsearch/gitclient.go
    • Line 14: warning: exported var GithubClients should have comment or be unexported (golint)
    • Line 18: warning: exported type Client should have comment or be unexported (golint)
    • Line 23: warning: exported function InitGithubClients should have comment or be unexported (golint)
    • Line 44: warning: exported function GetGithubClient should have comment or be unexported (golint)
    • Line 61: warning: exported function NewGitClient should have comment or be unexported (golint)
    • Line 65: warning: exported method Client.GetUserInfo should have comment or be unexported (golint)
    • Line 70: warning: exported method Client.GetOrgsMembers should have comment or be unexported (golint)
    • Line 75: warning: exported method Client.GetOrgsRepos should have comment or be unexported (golint)
    • Line 80: warning: exported method Client.GetUserRepos should have comment or be unexported (golint)
    • Line 105: warning: exported method Client.GetUserOrgs should have comment or be unexported (golint)
    • gshark/server/service/exa_customer.go
    • Line 15: warning: exported function CreateExaCustomer should have comment or be unexported (golint)
    • Line 26: warning: exported function DeleteExaCustomer should have comment or be unexported (golint)
    • Line 37: warning: exported function UpdateExaCustomer should have comment or be unexported (golint)
    • Line 48: warning: error should be the last type when returning multiple items (golint)
    • Line 48: warning: exported function GetExaCustomer should have comment or be unexported (golint)
    • Line 59: warning: error should be the last type when returning multiple items (golint)
    • Line 59: warning: exported function GetCustomerInfoList should have comment or be unexported (golint)
    • Line 74: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gshark/server/service/filter.go
    • Line 15: warning: exported function CreateFilter should have comment or be unexported (golint)
    • Line 26: warning: exported function DeleteFilter should have comment or be unexported (golint)
    • Line 37: warning: exported function DeleteFilterByIds should have comment or be unexported (golint)
    • Line 48: warning: exported function UpdateFilter should have comment or be unexported (golint)
    • Line 59: warning: error should be the last type when returning multiple items (golint)
    • Line 59: warning: exported function GetFilter should have comment or be unexported (golint)
    • Line 70: warning: error should be the last type when returning multiple items (golint)
    • Line 70: warning: exported function GetFilterInfoList should have comment or be unexported (golint)
    • gshark/server/api/v1/sys_dictionary_detail.go
    • Line 14: warning: comment on exported function CreateSysDictionaryDetail should be of the form "CreateSysDictionaryDetail ..." (golint)
    • Line 33: warning: comment on exported function DeleteSysDictionaryDetail should be of the form "DeleteSysDictionaryDetail ..." (golint)
    • Line 52: warning: comment on exported function UpdateSysDictionaryDetail should be of the form "UpdateSysDictionaryDetail ..." (golint)
    • Line 71: warning: comment on exported function FindSysDictionaryDetail should be of the form "FindSysDictionaryDetail ..." (golint)
    • Line 94: warning: comment on exported function GetSysDictionaryDetailList should be of the form "GetSysDictionaryDetailList ..." (golint)
    • gshark/server/api/v1/sys_initdb.go
    • Line 13: warning: comment on exported function InitDB should be of the form "InitDB ..." (golint)
    • Line 43: warning: comment on exported function CheckDB should be of the form "CheckDB ..." (golint)
    • Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gshark/server/utils/server.go
    • Line 12: warning: exported const B should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type Server should have comment or be unexported (golint)
    • Line 25: warning: exported type Os should have comment or be unexported (golint)
    • Line 33: warning: exported type Cpu should have comment or be unexported (golint)
    • Line 39: warning: exported type Rrm should have comment or be unexported (golint)
    • Line 45: warning: exported type Disk should have comment or be unexported (golint)
    • Line 58: warning: exported function InitOS should have comment or be unexported (golint)
    • Line 72: warning: exported function InitCPU should have comment or be unexported (golint)
    • Line 75: 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 80: 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 91: warning: exported function InitRAM should have comment or be unexported (golint)
    • Line 94: 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 107: warning: exported function InitDisk should have comment or be unexported (golint)
    • Line 110: 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)
    • gshark/server/search/githubsearch/search.go
    • Line 21: warning: exported const SearchNum should have comment or be unexported (golint)
    • Line 23: warning: exported function GenerateSearchCodeTask should have comment or be unexported (golint)
    • Line 43: warning: exported function Search should have comment or be unexported (golint)
    • Line 73: warning: exported function RunSearchTask should have comment or be unexported (golint)
    • Line 86: warning: exported function SaveResult should have comment or be unexported (golint)
    • Line 105: warning: exported function ConvertToSearchResults should have comment or be unexported (golint)
    • Line 133: warning: exported function RunTask should have comment or be unexported (golint)
    • Line 139: warning: exported method Client.SearchCode should have comment or be unexported (golint)
    • Line 161: warning: exported function BuildQuery should have comment or be unexported (golint)
    • Line 189: warning: context.Context should be the first parameter of a function (golint)
    • gshark/server/service/sys_system.go
    • Line 16: warning: error should be the last type when returning multiple items (golint)
    • Line 16: warning: exported function GetSystemConfig should have comment or be unexported (golint)
    • Line 27: warning: exported function SetSystemConfig should have comment or be unexported (golint)
    • Line 41: warning: exported function GetServerInfo should have comment or be unexported (golint)
    • gshark/server/service/subdomain.go
    • Line 15: warning: exported function CreateSubdomain should have comment or be unexported (golint)
    • Line 26: warning: exported function DeleteSubdomain should have comment or be unexported (golint)
    • Line 37: warning: exported function DeleteSubdomainByIds should have comment or be unexported (golint)
    • Line 48: warning: exported function UpdateSubdomain should have comment or be unexported (golint)
    • Line 59: warning: error should be the last type when returning multiple items (golint)
    • Line 59: warning: exported function GetSubdomain should have comment or be unexported (golint)
    • Line 70: warning: error should be the last type when returning multiple items (golint)
    • Line 70: warning: exported function GetSubdomainInfoList should have comment or be unexported (golint)
    • gshark/server/api/v1/searchResult.go
    • Line 13: warning: comment on exported function CreateSearchResult should be of the form "CreateSearchResult ..." (golint)
    • Line 32: warning: comment on exported function DeleteSearchResult should be of the form "DeleteSearchResult ..." (golint)
    • Line 51: warning: comment on exported function DeleteSearchResultByIds should be of the form "DeleteSearchResultByIds ..." (golint)
    • Line 70: warning: exported function UpdateSearchResultByIds should have comment or be unexported (golint)
    • Line 81: warning: comment on exported function UpdateSearchResult should be of the form "UpdateSearchResult ..." (golint)
    • Line 100: warning: comment on exported function FindSearchResult should be of the form "FindSearchResult ..." (golint)
    • Line 119: warning: comment on exported function GetSearchResultList should be of the form "GetSearchResultList ..." (golint)
    • gshark/server/service/repo.go
    • Line 17: warning: exported function CreateRepo should have comment or be unexported (golint)
    • Line 28: warning: exported function DeleteRepo should have comment or be unexported (golint)
    • Line 39: warning: exported function DeleteRepoByIds should have comment or be unexported (golint)
    • Line 50: warning: exported function UpdateRepo should have comment or be unexported (golint)
    • Line 61: warning: error should be the last type when returning multiple items (golint)
    • Line 61: warning: exported function GetRepo should have comment or be unexported (golint)
    • Line 72: warning: error should be the last type when returning multiple items (golint)
    • Line 72: warning: exported function GetRepoInfoList should have comment or be unexported (golint)
    • Line 84: warning: error should be the last type when returning multiple items (golint)
    • Line 84: warning: exported function GetRepoByType should have comment or be unexported (golint)
    • Line 90: warning: error should be the last type when returning multiple items (golint)
    • Line 90: warning: exported function CheckRepoExist should have comment or be unexported (golint)
    • gshark/server/api/v1/sys_menu.go
    • Line 14: warning: comment on exported function GetMenu should be of the form "GetMenu ..." (golint)
    • Line 30: warning: comment on exported function GetBaseMenuTree should be of the form "GetBaseMenuTree ..." (golint)
    • Line 46: warning: comment on exported function AddMenuAuthority should be of the form "AddMenuAuthority ..." (golint)
    • Line 69: warning: comment on exported function GetMenuAuthority should be of the form "GetMenuAuthority ..." (golint)
    • Line 92: warning: comment on exported function AddBaseMenu should be of the form "AddBaseMenu ..." (golint)
    • Line 120: warning: comment on exported function DeleteBaseMenu should be of the form "DeleteBaseMenu ..." (golint)
    • Line 143: warning: comment on exported function UpdateBaseMenu should be of the form "UpdateBaseMenu ..." (golint)
    • Line 170: warning: comment on exported function GetBaseMenuById should be of the form "GetBaseMenuById ..." (golint)
    • Line 193: warning: comment on exported function GetMenuList should be of the form "GetMenuList ..." (golint)
    • gshark/server/model/sys_dictionary_detail.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 8: warning: comment on exported type SysDictionaryDetail should be of the form "SysDictionaryDetail ..." (with optional leading article) (golint)
    • gshark/server/service/sys_dictionary_detail.go
    • Line 15: warning: exported function CreateSysDictionaryDetail should have comment or be unexported (golint)
    • Line 26: warning: exported function DeleteSysDictionaryDetail should have comment or be unexported (golint)
    • Line 37: warning: exported function UpdateSysDictionaryDetail should have comment or be unexported (golint)
    • Line 48: warning: error should be the last type when returning multiple items (golint)
    • Line 48: warning: exported function GetSysDictionaryDetail should have comment or be unexported (golint)
    • Line 59: warning: error should be the last type when returning multiple items (golint)
    • Line 59: warning: exported function GetSysDictionaryDetailInfoList should have comment or be unexported (golint)
    • gshark/server/api/v1/sys_system.go
    • Line 17: warning: comment on exported function GetSystemConfig should be of the form "GetSystemConfig ..." (golint)
    • Line 32: warning: comment on exported function SetSystemConfig should be of the form "SetSystemConfig ..." (golint)
    • Line 50: warning: comment on exported function ReloadSystem should be of the form "ReloadSystem ..." (golint)
    • Line 73: warning: comment on exported function GetServerInfo should be of the form "GetServerInfo ..." (golint)
    • Line 84: 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)
    • gshark/server/service/jwt_black_list.go
    • Line 17: warning: exported function JsonInBlacklist should have comment or be unexported (golint)
    • Line 28: warning: exported function IsBlacklist should have comment or be unexported (golint)
    • Line 39: warning: error should be the last type when returning multiple items (golint)
    • Line 39: warning: exported function GetRedisJWT should have comment or be unexported (golint)
    • Line 50: warning: exported function SetRedisJWT should have comment or be unexported (golint)
    • gshark/server/model/exa_breakpoint_continue.go
    • Line 7: warning: comment on exported type ExaFile should be of the form "ExaFile ..." (with optional leading article) (golint)
    • Line 18: warning: comment on exported type ExaFileChunk should be of the form "ExaFileChunk ..." (with optional leading article) (golint)
    • gshark/server/service/sys_casbin.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 21: warning: exported function UpdateCasbin should have comment or be unexported (golint)
    • Line 47: warning: exported function UpdateCasbinApi should have comment or be unexported (golint)
    • Line 61: warning: exported function GetPolicyPathByAuthorityId should have comment or be unexported (golint)
    • Line 79: warning: exported function ClearCasbin should have comment or be unexported (golint)
    • Line 91: warning: exported function Casbin should have comment or be unexported (golint)
    • Line 106: warning: exported function ParamsMatch should have comment or be unexported (golint)
    • Line 118: warning: exported function ParamsMatchFunc should have comment or be unexported (golint)
    • gshark/server/api/v1/exa_excel.go
    • Line 18: warning: comment on exported function ExportExcel should be of the form "ExportExcel ..." (golint)
    • Line 40: warning: comment on exported function ImportExcel should be of the form "ImportExcel ..." (golint)
    • Line 59: warning: comment on exported function LoadExcel should be of the form "LoadExcel ..." (golint)
    • Line 80: warning: comment on exported function DownloadTemplate should be of the form "DownloadTemplate ..." (golint)
    • gshark/server/api/v1/sys_dictionary.go
    • Line 14: warning: comment on exported function CreateSysDictionary should be of the form "CreateSysDictionary ..." (golint)
    • Line 33: warning: comment on exported function DeleteSysDictionary should be of the form "DeleteSysDictionary ..." (golint)
    • Line 52: warning: comment on exported function UpdateSysDictionary should be of the form "UpdateSysDictionary ..." (golint)
    • Line 71: warning: comment on exported function FindSysDictionary should be of the form "FindSysDictionary ..." (golint)
    • Line 90: warning: comment on exported function GetSysDictionaryList should be of the form "GetSysDictionaryList ..." (golint)
    • gshark/server/utils/breakpoint_continue.go
    • Line 23: warning: error should be the last type when returning multiple items (golint)
    • Line 23: warning: exported function BreakPointContinue should have comment or be unexported (golint)
    • Line 40: warning: exported function CheckMd5 should have comment or be unexported (golint)
    • Line 44: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 55: warning: error should be the last type when returning multiple items (golint)
    • Line 60: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 76: warning: error should be the last type when returning multiple items (golint)
    • Line 76: warning: exported function MakeFile should have comment or be unexported (golint)
    • Line 105: warning: exported function RemoveChunk should have comment or be unexported (golint)
    • gshark/server/model/sys_dictionary.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 8: warning: comment on exported type SysDictionary should be of the form "SysDictionary ..." (with optional leading article) (golint)
    • gshark/server/api/v1/filter.go
    • Line 13: warning: comment on exported function CreateFilter should be of the form "CreateFilter ..." (golint)
    • Line 32: warning: comment on exported function DeleteFilter should be of the form "DeleteFilter ..." (golint)
    • Line 51: warning: comment on exported function DeleteFilterByIds should be of the form "DeleteFilterByIds ..." (golint)
    • Line 70: warning: comment on exported function UpdateFilter should be of the form "UpdateFilter ..." (golint)
    • Line 89: warning: comment on exported function FindFilter should be of the form "FindFilter ..." (golint)
    • Line 108: warning: comment on exported function GetFilterList should be of the form "GetFilterList ..." (golint)
    • gshark/server/api/v1/rule.go
    • Line 13: warning: comment on exported function CreateRule should be of the form "CreateRule ..." (golint)
    • Line 32: warning: comment on exported function DeleteRule should be of the form "DeleteRule ..." (golint)
    • Line 51: warning: comment on exported function DeleteRuleByIds should be of the form "DeleteRuleByIds ..." (golint)
    • Line 70: warning: comment on exported function UpdateRule should be of the form "UpdateRule ..." (golint)
    • Line 89: warning: comment on exported function FindRule should be of the form "FindRule ..." (golint)
    • Line 108: warning: comment on exported function GetRuleList should be of the form "GetRuleList ..." (golint)
    • gshark/server/model/response/response.go
    • Line 8: warning: exported type Response should have comment or be unexported (golint)
    • Line 15: warning: exported const ERROR should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported function Result should have comment or be unexported (golint)
    • Line 28: warning: exported function Ok should have comment or be unexported (golint)
    • Line 32: warning: exported function OkWithMessage should have comment or be unexported (golint)
    • Line 36: warning: exported function OkWithData should have comment or be unexported (golint)
    • Line 40: warning: exported function OkWithDetailed should have comment or be unexported (golint)
    • Line 44: warning: exported function Fail should have comment or be unexported (golint)
    • Line 48: warning: exported function FailWithMessage should have comment or be unexported (golint)
    • Line 52: warning: exported function FailWithDetailed should have comment or be unexported (golint)
    • gshark/server/utils/upload/qiniu.go
    • Line 15: warning: exported type Qiniu should have comment or be unexported (golint)
    • Line 26: warning: exported method Qiniu.UploadFile should have comment or be unexported (golint)
    • Line 59: warning: exported method Qiniu.DeleteFile should have comment or be unexported (golint)
    • gshark/server/model/sys_base_menu.go
    • Line 7: warning: exported type SysBaseMenu should have comment or be unexported (golint)
    • Line 22: warning: exported type Meta should have comment or be unexported (golint)
    • Line 30: warning: exported type SysBaseMenuParameter should have comment or be unexported (golint)
    • gshark/server/initialize/gorm.go
    • Line 20: warning: exported function Gorm should have comment or be unexported (golint)
    • Line 35: warning: exported function MysqlTables should have comment or be unexported (golint)
    • Line 74: warning: exported function GormMysql should have comment or be unexported (golint)
    • Line 93: 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)
    • gshark/server/model/request/common.go
    • Line 3: warning: comment on exported type PageInfo should be of the form "PageInfo ..." (with optional leading article) (golint)
    • Line 9: warning: comment on exported type GetById should be of the form "GetById ..." (with optional leading article) (golint)
    • Line 14: warning: exported type IdsReq should have comment or be unexported (golint)
    • Line 18: warning: exported type BatchUpdateReq should have comment or be unexported (golint)
    • Line 23: warning: exported type UpdateReq should have comment or be unexported (golint)
    • Line 28: warning: comment on exported type GetAuthorityId should be of the form "GetAuthorityId ..." (with optional leading article) (golint)
    • Line 33: warning: exported type Empty should have comment or be unexported (golint)
    • gshark/server/service/sys_auto_code.go
    • Line 36: warning: exported function PreviewTemp should have comment or be unexported (golint)
    • Line 101: warning: exported function CreateTemp should have comment or be unexported (golint)
    • Line 129: warning: should omit 2nd value from range; this loop is equivalent to `for index := range ...` (golint)
    • Line 150: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 164: warning: exported function GetAllTplFile should have comment or be unexported (golint)
    • Line 188: warning: error should be the last type when returning multiple items (golint)
    • Line 188: warning: exported function GetTables should have comment or be unexported (golint)
    • Line 200: warning: error should be the last type when returning multiple items (golint)
    • Line 200: warning: exported function GetDB should have comment or be unexported (golint)
    • Line 212: warning: error should be the last type when returning multiple items (golint)
    • Line 212: warning: exported function GetColumn should have comment or be unexported (golint)
    • Line 269: warning: exported function AutoCreateApi should have comment or be unexported (golint)
    • gshark/server/utils/validator.go
    • Line 10: warning: exported type Rules should have comment or be unexported (golint)
    • Line 12: warning: exported type RulesMap should have comment or be unexported (golint)
    • Line 14: warning: exported var CustomizeMap should have comment or be unexported (golint)
    • Line 22: warning: exported function RegisterRule should have comment or be unexported (golint)
    • Line 25: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 37: warning: exported function NotEmpty should have comment or be unexported (golint)
    • Line 47: warning: exported function Lt should have comment or be unexported (golint)
    • Line 57: warning: exported function Le should have comment or be unexported (golint)
    • Line 67: warning: exported function Eq should have comment or be unexported (golint)
    • Line 77: warning: exported function Ne should have comment or be unexported (golint)
    • Line 87: warning: exported function Ge should have comment or be unexported (golint)
    • Line 97: warning: exported function Gt should have comment or be unexported (golint)
    • Line 108: warning: exported function Verify should have comment or be unexported (golint)
    • gshark/server/model/request/sys_user.go
    • Line 5: warning: comment on exported type Register should be of the form "Register ..." (with optional leading article) (golint)
    • Line 14: warning: comment on exported type Login should be of the form "Login ..." (with optional leading article) (golint)
    • Line 22: warning: comment on exported type ChangePasswordStruct should be of the form "ChangePasswordStruct ..." (with optional leading article) (golint)
    • Line 29: warning: comment on exported type SetUserAuth should be of the form "SetUserAuth ..." (with optional leading article) (golint)
    • gshark/server/utils/upload/local.go
    • Line 16: warning: exported type Local should have comment or be unexported (golint)
    • Line 27: warning: exported method Local.UploadFile should have comment or be unexported (golint)
    • Line 76: warning: exported method Local.DeleteFile should have comment or be unexported (golint)
    • gshark/server/api/v1/exa_file_upload_download.go
    • Line 13: warning: comment on exported function UploadFile should be of the form "UploadFile ..." (golint)
    • Line 39: warning: comment on exported function DeleteFile should be of the form "DeleteFile ..." (golint)
    • Line 57: warning: comment on exported function GetFileList should be of the form "GetFileList ..." (golint)
    • gshark/server/api/v1/subdomain.go
    • Line 13: warning: comment on exported function CreateSubdomain should be of the form "CreateSubdomain ..." (golint)
    • Line 32: warning: comment on exported function DeleteSubdomain should be of the form "DeleteSubdomain ..." (golint)
    • Line 51: warning: comment on exported function DeleteSubdomainByIds should be of the form "DeleteSubdomainByIds ..." (golint)
    • Line 70: warning: comment on exported function UpdateSubdomain should be of the form "UpdateSubdomain ..." (golint)
    • Line 89: warning: comment on exported function FindSubdomain should be of the form "FindSubdomain ..." (golint)
    • Line 108: warning: comment on exported function GetSubdomainList should be of the form "GetSubdomainList ..." (golint)
    • gshark/server/model/response/sys_menu.go
    • Line 5: warning: exported type SysMenusResponse should have comment or be unexported (golint)
    • Line 9: warning: exported type SysBaseMenusResponse should have comment or be unexported (golint)
    • Line 13: warning: exported type SysBaseMenuResponse should have comment or be unexported (golint)
    • gshark/server/service/searchResult.go
    • Line 17: warning: exported function CreateSearchResult should have comment or be unexported (golint)
    • Line 28: warning: exported function DeleteSearchResult should have comment or be unexported (golint)
    • Line 39: warning: exported function DeleteSearchResultByIds should have comment or be unexported (golint)
    • Line 44: warning: exported function UpdateSearchResultByIds should have comment or be unexported (golint)
    • Line 56: warning: exported function UpdateSearchResult should have comment or be unexported (golint)
    • Line 62: warning: exported function UpdateSearchResultById should have comment or be unexported (golint)
    • Line 73: warning: error should be the last type when returning multiple items (golint)
    • Line 73: warning: exported function GetSearchResult should have comment or be unexported (golint)
    • Line 84: warning: error should be the last type when returning multiple items (golint)
    • Line 84: warning: exported function GetSearchResultInfoList should have comment or be unexported (golint)
    • Line 105: warning: error should be the last type when returning multiple items (golint)
    • Line 105: warning: exported function CheckExistOfSearchResult should have comment or be unexported (golint)
    • gshark/server/service/sys_dictionary.go
    • Line 17: warning: exported function CreateSysDictionary should have comment or be unexported (golint)
    • Line 31: warning: exported function DeleteSysDictionary should have comment or be unexported (golint)
    • Line 42: warning: exported function UpdateSysDictionary should have comment or be unexported (golint)
    • Line 69: warning: error should be the last type when returning multiple items (golint)
    • Line 69: warning: exported function GetSysDictionary should have comment or be unexported (golint)
    • Line 81: warning: error should be the last type when returning multiple items (golint)
    • Line 81: warning: exported function GetSysDictionaryInfoList should have comment or be unexported (golint)
    • gshark/server/service/sys_initdb.go
    • Line 68: warning: exported function InitDB should have comment or be unexported (golint)
    • Line 118: 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 170: warning: exported function RemoveDB should have comment or be unexported (golint)
    • gshark/server/api/v1/exa_simple_uploader.go
    • Line 13: warning: comment on exported function SimpleUploaderUpload should be of the form "SimpleUploaderUpload ..." (golint)
    • Line 50: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 55: warning: comment on exported function CheckFileMd5 should be of the form "CheckFileMd5 ..." (golint)
    • Line 76: warning: comment on exported function MergeFileMd5 should be of the form "MergeFileMd5 ..." (golint)
    • gshark/server/api/v1/sys_operation_record.go
    • Line 14: warning: comment on exported function CreateSysOperationRecord should be of the form "CreateSysOperationRecord ..." (golint)
    • Line 33: warning: comment on exported function DeleteSysOperationRecord should be of the form "DeleteSysOperationRecord ..." (golint)
    • Line 52: warning: comment on exported function DeleteSysOperationRecordByIds should be of the form "DeleteSysOperationRecordByIds ..." (golint)
    • Line 71: warning: comment on exported function FindSysOperationRecord should be of the form "FindSysOperationRecord ..." (golint)
    • Line 94: warning: comment on exported function GetSysOperationRecordList should be of the form "GetSysOperationRecordList ..." (golint)
    • gshark/server/cmd/cmd.go
    • Line 9: warning: exported var Web should have comment or be unexported (golint)
    • Line 28: warning: exported var Scan should have comment or be unexported (golint)
    • gshark/server/service/exa_simple_uploader.go
    • Line 20: warning: exported function SaveChunk should have comment or be unexported (golint)
    • Line 30: warning: error should be the last type when returning multiple items (golint)
    • Line 30: warning: exported function CheckFileMd5 should have comment or be unexported (golint)
    • Line 42: warning: exported function MergeFileMd5 should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 2)