Preparing report...

Report for github.com/hunterhug/rabbit

(v0.0.0-20190827041421-d43a9a69584b)

A    Great!    Found 43 issues across 47 files

Tweet

gofmt89%

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.

    • rabbit/controllers/rbac.go
    • Line 135: warning: cyclomatic complexity 20 of function GetAccessList() is high (> 15) (gocyclo)
    • Line 33: warning: cyclomatic complexity 19 of function AccessRegister() is high (> 15) (gocyclo)

golint8%

Golint is a linter for Go source code.

    • rabbit/models/util/db.go
    • Line 1: warning: package comment should be of the form "Package util ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 22: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 32: warning: exported function Createtb should have comment or be unexported (golint)
    • Line 38: warning: exported function Syncdb should have comment or be unexported (golint)
    • Line 49: warning: exported function UpdateRbac should have comment or be unexported (golint)
    • Line 56: warning: exported function CreateConfig should have comment or be unexported (golint)
    • Line 66: warning: comment on exported function Createdb should be of the form "Createdb ..." (golint)
    • Line 103: warning: exported function TruncateRbacTable should have comment or be unexported (golint)
    • Line 132: warning: exported function Connect should have comment or be unexported (golint)
    • rabbit/models/admin/RoleModel.go
    • Line 1: warning: package comment should be of the form "Package admin ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: comment on exported type Role should be of the form "Role ..." (with optional leading article) (golint)
    • Line 35: warning: exported method Role.TableName should have comment or be unexported (golint)
    • Line 51: warning: exported function GetRolelist should have comment or be unexported (golint)
    • Line 51: warning: don't use underscores in Go names; func parameter page_size should be pageSize (golint)
    • Line 66: warning: exported function AddRole should have comment or be unexported (golint)
    • Line 81: warning: exported function UpdateRole should have comment or be unexported (golint)
    • Line 107: warning: exported function DelRoleById should have comment or be unexported (golint)
    • Line 121: warning: exported function GetNodelistByRoleId should have comment or be unexported (golint)
    • Line 128: warning: exported function DelGroupNode should have comment or be unexported (golint)
    • Line 149: warning: exported function AddRoleNode should have comment or be unexported (golint)
    • Line 158: warning: exported function DelUserRole should have comment or be unexported (golint)
    • Line 163: warning: exported function AddRoleUser should have comment or be unexported (golint)
    • Line 172: warning: exported function GetUserByRoleId should have comment or be unexported (golint)
    • Line 179: warning: exported function AccessList should have comment or be unexported (golint)
    • Line 201: warning: exported method Role.Insert should have comment or be unexported (golint)
    • Line 201: warning: receiver name m should be consistent with previous receiver name r for Role (golint)
    • Line 208: warning: receiver name m should be consistent with previous receiver name r for Role (golint)
    • Line 215: warning: exported method Role.Update should have comment or be unexported (golint)
    • Line 215: warning: receiver name m should be consistent with previous receiver name r for Role (golint)
    • Line 222: warning: exported method Role.Delete should have comment or be unexported (golint)
    • Line 222: warning: receiver name m should be consistent with previous receiver name r for Role (golint)
    • Line 229: warning: exported method Role.Query should have comment or be unexported (golint)
    • Line 229: warning: receiver name m should be consistent with previous receiver name r for Role (golint)
    • rabbit/controllers/admin/blog/category.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 9: warning: exported type CategoryController should have comment or be unexported (golint)
    • Line 13: warning: exported method CategoryController.Index should have comment or be unexported (golint)
    • Line 13: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 36: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 44: warning: exported method CategoryController.AddCategory should have comment or be unexported (golint)
    • Line 44: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 78: warning: exported method CategoryController.UpdateCategory should have comment or be unexported (golint)
    • Line 78: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 151: warning: exported method CategoryController.DeleteCategory should have comment or be unexported (golint)
    • Line 151: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/lib/lib.go
    • Line 1: warning: package comment should be of the form "Package lib ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 32: warning: comment on exported function Base64E should be of the form "Base64E ..." (golint)
    • Line 39: warning: comment on exported function Base64D should be of the form "Base64D ..." (golint)
    • Line 50: warning: comment on exported function UrlE should be of the form "UrlE ..." (golint)
    • Line 55: warning: comment on exported function UrlD should be of the form "UrlD ..." (golint)
    • Line 60: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 65: warning: comment on exported function GetTime should be of the form "GetTime ..." (golint)
    • Line 74: warning: comment on exported function GetTodayString should be of the form "GetTodayString ..." (golint)
    • Line 84: warning: comment on exported function GetTimeString should be of the form "GetTimeString ..." (golint)
    • Line 93: warning: comment on exported function GetFileBaseDir should be of the form "GetFileBaseDir ..." (golint)
    • Line 98: warning: comment on exported function MakeFileDir should be of the form "MakeFileDir ..." (golint)
    • Line 105: warning: comment on exported function HasFile should be of the form "HasFile ..." (golint)
    • Line 115: warning: comment on exported function CopyFF should be of the form "CopyFF ..." (golint)
    • Line 121: warning: comment on exported function CopyFS should be of the form "CopyFS ..." (golint)
    • Line 132: warning: exported function Md5FS should have comment or be unexported (golint)
    • Line 141: warning: comment on exported function IsFile should be of the form "IsFile ..." (golint)
    • Line 146: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 149: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 155: warning: comment on exported function IsDir should be of the form "IsDir ..." (golint)
    • Line 160: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 163: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 169: warning: comment on exported function FileStatus should be of the form "FileStatus ..." (golint)
    • Line 179: warning: comment on exported function SizeofDir should be of the form "SizeofDir ..." (golint)
    • Line 189: warning: comment on exported function InArray should be of the form "InArray ..." (golint)
    • Line 199: warning: comment on exported function GetFileSuffix should be of the form "GetFileSuffix ..." (golint)
    • Line 204: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 209: warning: comment on exported function Strtomd5 should be of the form "Strtomd5 ..." (golint)
    • Line 217: warning: comment on exported function Pwdhash should be of the form "Pwdhash ..." (golint)
    • Line 222: warning: exported function Md5 should have comment or be unexported (golint)
    • Line 226: warning: exported function StringsToJson should have comment or be unexported (golint)
    • Line 241: warning: exported function Rawurlencode should have comment or be unexported (golint)
    • Line 245: warning: comment on exported function GetClientIp should be of the form "GetClientIp ..." (golint)
    • Line 267: warning: comment on exported function Hashcode should be of the form "Hashcode ..." (golint)
    • Line 282: warning: exported function TripAll should have comment or be unexported (golint)
    • rabbit/routers/router.go
    • Line 1: warning: package comment should be of the form "Package routers ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 16: warning: comment on exported function Run should be of the form "Run ..." (golint)
    • rabbit/models/blog/CategoryModel.go
    • Line 1: warning: package comment should be of the form "Package blog ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 21: warning: exported type Category should have comment or be unexported (golint)
    • Line 36: warning: exported method Category.TableName should have comment or be unexported (golint)
    • Line 47: warning: exported method Category.Update should have comment or be unexported (golint)
    • Line 54: warning: exported method Category.Delete should have comment or be unexported (golint)
    • Line 61: warning: exported method Category.Query should have comment or be unexported (golint)
    • Line 65: warning: exported method Category.Insert should have comment or be unexported (golint)
    • rabbit/controllers/admin/rbac/base.go
    • Line 1: warning: package comment should be of the form "Package rbac ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 26: warning: exported type Tree should have comment or be unexported (golint)
    • Line 36: warning: exported type Attributes should have comment or be unexported (golint)
    • Line 42: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/models/admin/GroupModel.go
    • Line 1: warning: package comment should be of the form "Package admin ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: exported type Group should have comment or be unexported (golint)
    • Line 33: warning: exported method Group.TableName should have comment or be unexported (golint)
    • Line 49: warning: exported function GetGrouplist should have comment or be unexported (golint)
    • Line 49: warning: don't use underscores in Go names; func parameter page_size should be pageSize (golint)
    • Line 64: warning: exported function AddGroup should have comment or be unexported (golint)
    • Line 78: warning: exported function UpdateGroup should have comment or be unexported (golint)
    • Line 101: warning: exported function DelGroupById should have comment or be unexported (golint)
    • Line 113: warning: exported function GroupList should have comment or be unexported (golint)
    • Line 121: warning: exported method Group.Insert should have comment or be unexported (golint)
    • Line 121: warning: receiver name m should be consistent with previous receiver name g for Group (golint)
    • Line 128: warning: receiver name m should be consistent with previous receiver name g for Group (golint)
    • Line 135: warning: exported method Group.Update should have comment or be unexported (golint)
    • Line 135: warning: receiver name m should be consistent with previous receiver name g for Group (golint)
    • Line 142: warning: exported method Group.Delete should have comment or be unexported (golint)
    • Line 142: warning: receiver name m should be consistent with previous receiver name g for Group (golint)
    • Line 149: warning: exported method Group.Query should have comment or be unexported (golint)
    • Line 149: warning: receiver name m should be consistent with previous receiver name g for Group (golint)
    • rabbit/controllers/admin/blog/album.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 9: warning: exported type AlbumController should have comment or be unexported (golint)
    • Line 13: warning: exported method AlbumController.Index should have comment or be unexported (golint)
    • Line 13: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 37: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 45: warning: exported method AlbumController.AddCategory should have comment or be unexported (golint)
    • Line 45: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 78: warning: exported method AlbumController.UpdateCategory should have comment or be unexported (golint)
    • Line 78: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 151: warning: exported method AlbumController.DeleteCategory should have comment or be unexported (golint)
    • Line 151: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/controllers/admin/blog/photo.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 9: warning: exported type PhotoController should have comment or be unexported (golint)
    • Line 13: warning: exported method PhotoController.Index should have comment or be unexported (golint)
    • Line 13: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 77: warning: exported method PhotoController.AddPaper should have comment or be unexported (golint)
    • Line 77: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 133: warning: exported method PhotoController.UpdatePaper should have comment or be unexported (golint)
    • Line 133: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 229: warning: exported method PhotoController.DeletePaper should have comment or be unexported (golint)
    • Line 229: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 247: warning: exported method PhotoController.RealDelPaper should have comment or be unexported (golint)
    • Line 247: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 263: warning: exported method PhotoController.Rubbish should have comment or be unexported (golint)
    • Line 263: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/models/blog/PaperModel.go
    • Line 1: warning: package comment should be of the form "Package blog ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 21: warning: exported type Paper should have comment or be unexported (golint)
    • Line 41: warning: exported method Paper.TableName should have comment or be unexported (golint)
    • Line 52: warning: exported method Paper.Update should have comment or be unexported (golint)
    • Line 59: warning: exported method Paper.Delete should have comment or be unexported (golint)
    • Line 66: warning: exported method Paper.Query should have comment or be unexported (golint)
    • Line 70: warning: exported method Paper.Insert should have comment or be unexported (golint)
    • rabbit/models/blog/RollModel.go
    • Line 1: warning: package comment should be of the form "Package blog ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 21: warning: exported type Roll should have comment or be unexported (golint)
    • Line 34: warning: exported method Roll.TableName should have comment or be unexported (golint)
    • Line 45: warning: exported method Roll.Update should have comment or be unexported (golint)
    • Line 52: warning: exported method Roll.Delete should have comment or be unexported (golint)
    • Line 59: warning: exported method Roll.Query should have comment or be unexported (golint)
    • Line 63: warning: exported method Roll.Insert should have comment or be unexported (golint)
    • rabbit/controllers/home/category.go
    • Line 1: warning: package comment should be of the form "Package home ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 21: warning: exported method MainController.Category should have comment or be unexported (golint)
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/controllers/home/paper.go
    • Line 11: warning: comment on exported method MainController.Paper should be of the form "Paper ..." (golint)
    • Line 12: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/models/util/register.go
    • Line 9: warning: exported function RegisterDBAdminModel should have comment or be unexported (golint)
    • Line 13: warning: exported function RegisterDBBlogModel should have comment or be unexported (golint)
    • Line 17: warning: exported function RegisterDBModel should have comment or be unexported (golint)
    • rabbit/controllers/admin/rbac/user.go
    • Line 1: warning: package comment should be of the form "Package rbac ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 20: warning: exported type UserController should have comment or be unexported (golint)
    • Line 24: warning: exported method UserController.Index should have comment or be unexported (golint)
    • Line 24: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 27: warning: don't use underscores in Go names; var page_size should be pageSize (golint)
    • Line 42: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 49: warning: exported method UserController.AddUser should have comment or be unexported (golint)
    • Line 49: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 60: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 67: warning: exported method UserController.UpdateUser should have comment or be unexported (golint)
    • Line 67: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 78: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 85: warning: comment on exported method UserController.UpdateUserPasswd should be of the form "UpdateUserPasswd ..." (golint)
    • Line 86: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 97: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 104: warning: exported method UserController.DelUser should have comment or be unexported (golint)
    • Line 104: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/models/admin/AdminInit.go
    • Line 1: warning: package comment should be of the form "Package admin ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: exported function InitData should have comment or be unexported (golint)
    • Line 35: warning: comment on exported function InsertConfig should be of the form "InsertConfig ..." (golint)
    • Line 74: warning: exported function InsertCategory should have comment or be unexported (golint)
    • Line 101: warning: exported function InsertPaper should have comment or be unexported (golint)
    • Line 136: warning: exported function InsertRoll should have comment or be unexported (golint)
    • Line 153: warning: comment on exported function InsertUser should be of the form "InsertUser ..." (golint)
    • Line 186: warning: comment on exported function InsertGroup should be of the form "InsertGroup ..." (golint)
    • Line 222: warning: comment on exported function InsertRole should be of the form "InsertRole ..." (golint)
    • Line 234: warning: comment on exported function InsertNodes should be of the form "InsertNodes ..." (golint)
    • rabbit/models/run.go
    • Line 1: warning: package comment should be of the form "Package models ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 26: warning: exported function Run should have comment or be unexported (golint)
    • rabbit/controllers/admin/blog/upload.go
    • Line 5: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 7: warning: should not use dot imports (golint)
    • Line 12: warning: exported var FileAllow should have comment or be unexported (golint)
    • Line 26: warning: exported var FileBytes should have comment or be unexported (golint)
    • Line 28: warning: exported type UploadController should have comment or be unexported (golint)
    • Line 32: warning: exported type Sizer should have comment or be unexported (golint)
    • Line 36: warning: comment on exported method UploadController.UploadFile should be of the form "UploadFile ..." (golint)
    • Line 53: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 163: warning: exported method UploadController.GetWebFile should have comment or be unexported (golint)
    • Line 163: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 183: warning: exported method UploadController.FileManage should have comment or be unexported (golint)
    • Line 183: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/controllers/admin/blog/base.go
    • Line 14: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 37: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/controllers/error.go
    • Line 1: warning: package comment should be of the form "Package controllers ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 20: warning: exported type ErrorController should have comment or be unexported (golint)
    • Line 24: warning: exported method ErrorController.Error404 should have comment or be unexported (golint)
    • Line 29: warning: exported method ErrorController.Error501 should have comment or be unexported (golint)
    • Line 34: warning: exported method ErrorController.ErrorDb should have comment or be unexported (golint)
    • Line 39: warning: exported method ErrorController.Error500 should have comment or be unexported (golint)
    • rabbit/controllers/admin/rbac/role.go
    • Line 1: warning: package comment should be of the form "Package rbac ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 23: warning: exported type RoleController should have comment or be unexported (golint)
    • Line 27: warning: exported method RoleController.Index should have comment or be unexported (golint)
    • Line 27: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: don't use underscores in Go names; var page_size should be pageSize (golint)
    • Line 47: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 53: warning: exported method RoleController.AddAndEdit should have comment or be unexported (golint)
    • Line 53: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 71: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 78: warning: exported method RoleController.DelRole should have comment or be unexported (golint)
    • Line 78: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 84: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 90: warning: exported method RoleController.Getlist should have comment or be unexported (golint)
    • Line 90: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 100: warning: exported method RoleController.AccessToNode should have comment or be unexported (golint)
    • Line 100: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 124: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 135: warning: exported method RoleController.AddAccess should have comment or be unexported (golint)
    • Line 135: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 137: warning: don't use underscores in Go names; var group_id should be groupID (golint)
    • Line 155: warning: exported method RoleController.RoleToUserList should have comment or be unexported (golint)
    • Line 155: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 173: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 180: warning: exported method RoleController.AddRoleToUser should have comment or be unexported (golint)
    • Line 180: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/models/admin/UserModel.go
    • Line 1: warning: package comment should be of the form "Package admin ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 22: warning: should not use dot imports (golint)
    • Line 25: warning: exported type User should have comment or be unexported (golint)
    • Line 41: warning: exported method User.TableName should have comment or be unexported (golint)
    • Line 45: warning: exported method User.Valid should have comment or be unexported (golint)
    • Line 63: warning: comment on exported function Getuserlist should be of the form "Getuserlist ..." (golint)
    • Line 64: warning: don't use underscores in Go names; func parameter page_size should be pageSize (golint)
    • Line 80: warning: exported function AddUser should have comment or be unexported (golint)
    • Line 98: warning: exported function UpdateUser should have comment or be unexported (golint)
    • Line 133: warning: exported function UpdateUserPasswd should have comment or be unexported (golint)
    • Line 157: warning: exported function UpdateLoginTime should have comment or be unexported (golint)
    • Line 164: warning: exported function DelUserById should have comment or be unexported (golint)
    • Line 170: warning: exported function GetUserByUsername should have comment or be unexported (golint)
    • Line 177: warning: exported method User.Insert should have comment or be unexported (golint)
    • Line 177: warning: receiver name m should be consistent with previous receiver name u for User (golint)
    • Line 184: warning: receiver name m should be consistent with previous receiver name u for User (golint)
    • Line 191: warning: exported method User.Update should have comment or be unexported (golint)
    • Line 191: warning: receiver name m should be consistent with previous receiver name u for User (golint)
    • Line 198: warning: exported method User.Delete should have comment or be unexported (golint)
    • Line 198: warning: receiver name m should be consistent with previous receiver name u for User (golint)
    • Line 205: warning: exported method User.Query should have comment or be unexported (golint)
    • Line 205: warning: receiver name m should be consistent with previous receiver name u for User (golint)
    • rabbit/controllers/admin/blog/config.go
    • Line 5: warning: exported type ConfigController should have comment or be unexported (golint)
    • Line 9: warning: exported method ConfigController.IndexUser should have comment or be unexported (golint)
    • Line 9: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 13: warning: exported method ConfigController.IndexOption should have comment or be unexported (golint)
    • Line 13: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 21: warning: exported method ConfigController.UpdateUser should have comment or be unexported (golint)
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 23: warning: exported method ConfigController.UpdateOption should have comment or be unexported (golint)
    • Line 23: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/controllers/admin/blog/roll.go
    • Line 6: warning: should not use dot imports (golint)
    • Line 12: warning: exported type RollController should have comment or be unexported (golint)
    • Line 16: warning: exported method RollController.Index should have comment or be unexported (golint)
    • Line 16: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 24: warning: exported method RollController.AddRoll should have comment or be unexported (golint)
    • Line 24: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 52: warning: exported method RollController.UpdateRoll should have comment or be unexported (golint)
    • Line 52: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 104: warning: exported method RollController.DeleteRoll should have comment or be unexported (golint)
    • Line 104: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/controllers/admin/rbac/common.go
    • Line 1: warning: package comment should be of the form "Package rbac ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 20: warning: exported type CommonController should have comment or be unexported (golint)
    • Line 24: warning: exported method CommonController.Prepare should have comment or be unexported (golint)
    • Line 24: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 28: warning: comment on exported method CommonController.Rsp should be of the form "Rsp ..." (golint)
    • Line 29: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 35: warning: comment on exported method CommonController.GetTemplate should be of the form "GetTemplate ..." (golint)
    • Line 36: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 40: warning: comment on exported method CommonController.GetTree should be of the form "GetTree ..." (golint)
    • Line 41: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/controllers/home/index.go
    • Line 1: warning: package comment should be of the form "Package home ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: exported type MainController should have comment or be unexported (golint)
    • Line 34: warning: comment on exported method MainController.Prepare should be of the form "Prepare ..." (golint)
    • Line 35: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 52: warning: exported method MainController.DetectIndex should have comment or be unexported (golint)
    • Line 52: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 81: warning: comment on exported method MainController.Index should be of the form "Index ..." (golint)
    • Line 82: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 112: warning: comment on exported function GetNav should be of the form "GetNav ..." (golint)
    • Line 128: warning: error should be the last type when returning multiple items (golint)
    • Line 128: warning: exported function GetBlocks should have comment or be unexported (golint)
    • Line 134: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 144: warning: comment on exported function GetPaper should be of the form "GetPaper ..." (golint)
    • Line 152: warning: comment on exported function GetPhoto should be of the form "GetPhoto ..." (golint)
    • Line 160: warning: error should be the last type when returning multiple items (golint)
    • Line 160: warning: exported function GetCategoryOrAlbum should have comment or be unexported (golint)
    • Line 170: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 176: warning: comment on exported function GetCategory should be of the form "GetCategory ..." (golint)
    • Line 177: warning: error should be the last type when returning multiple items (golint)
    • Line 181: warning: comment on exported function GetAlbum should be of the form "GetAlbum ..." (golint)
    • Line 182: warning: error should be the last type when returning multiple items (golint)
    • rabbit/controllers/home/base.go
    • Line 1: warning: package comment should be of the form "Package home ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 62: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 82: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/lib/cache.go
    • Line 3: warning: exported var Cache should have comment or be unexported (golint)
    • Line 5: warning: exported type LocalCache should have comment or be unexported (golint)
    • Line 9: warning: exported method LocalCache.Get should have comment or be unexported (golint)
    • Line 9: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 16: warning: exported method LocalCache.Put should have comment or be unexported (golint)
    • Line 16: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 21: warning: exported method LocalCache.Delete should have comment or be unexported (golint)
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 26: warning: exported method LocalCache.IsExist should have comment or be unexported (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: exported function NewCache should have comment or be unexported (golint)
    • rabbit/models/blog/ConfigModel.go
    • Line 1: warning: package comment should be of the form "Package blog ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 19: warning: exported type Config should have comment or be unexported (golint)
    • Line 33: warning: exported method Config.TableName should have comment or be unexported (golint)
    • Line 44: warning: exported method Config.Update should have comment or be unexported (golint)
    • Line 51: warning: exported method Config.Delete should have comment or be unexported (golint)
    • Line 58: warning: exported method Config.Query should have comment or be unexported (golint)
    • Line 62: warning: exported method Config.Insert should have comment or be unexported (golint)
    • rabbit/controllers/admin/rbac/group.go
    • Line 1: warning: package comment should be of the form "Package rbac ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 19: warning: exported type GroupController should have comment or be unexported (golint)
    • Line 23: warning: exported method GroupController.Index should have comment or be unexported (golint)
    • Line 23: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 26: warning: don't use underscores in Go names; var page_size should be pageSize (golint)
    • Line 40: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 46: warning: exported method GroupController.AddGroup should have comment or be unexported (golint)
    • Line 46: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 57: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 64: warning: exported method GroupController.UpdateGroup should have comment or be unexported (golint)
    • Line 64: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 75: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 82: warning: exported method GroupController.DelGroup should have comment or be unexported (golint)
    • Line 82: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 88: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rabbit/controllers/admin/rbac/public.go
    • Line 1: warning: package comment should be of the form "Package rbac ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 19: warning: should not use dot imports (golint)
    • Line 26: warning: exported type MainController should have comment or be unexported (golint)
    • Line 30: warning: comment on exported method MainController.Index should be of the form "Index ..." (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 76: warning: comment on exported method MainController.Login should be of the form "Login ..." (golint)
    • Line 77: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 156: warning: comment on exported method MainController.Logout should be of the form "Logout ..." (golint)
    • Line 157: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 166: warning: comment on exported method MainController.Changepwd should be of the form "Changepwd ..." (golint)
    • Line 167: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 211: warning: exported function CheckLogin should have comment or be unexported (golint)
    • Line 228: warning: exported function CheckCookie should have comment or be unexported (golint)
    • Line 240: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rabbit/lib/pager.go
    • Line 9: warning: exported type Pager should have comment or be unexported (golint)
    • Line 16: warning: exported function NewPager should have comment or be unexported (golint)
    • Line 25: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 29: warning: exported method Pager.ToString should have comment or be unexported (golint)
    • Line 29: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/controllers/rbac.go
    • Line 14: warning: package comment should be of the form "Package controllers ..." (golint)
    • Line 32: warning: comment on exported function AccessRegister should be of the form "AccessRegister ..." (golint)
    • Line 44: warning: don't use underscores in Go names; var id_str should be idStr (golint)
    • Line 45: warning: don't use underscores in Go names; var user_id should be userID (golint)
    • Line 98: warning: comment on exported function CheckAccess should be of the form "CheckAccess ..." (golint)
    • Line 111: warning: comment on exported function AccessDecision should be of the form "AccessDecision ..." (golint)
    • Line 128: warning: exported type AccessNode should have comment or be unexported (golint)
    • Line 134: warning: comment on exported function GetAccessList should be of the form "GetAccessList ..." (golint)
    • rabbit/controllers/admin/rbac/node.go
    • Line 1: warning: package comment should be of the form "Package rbac ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 21: warning: exported type NodeController should have comment or be unexported (golint)
    • Line 25: warning: exported method NodeController.Rsp should have comment or be unexported (golint)
    • Line 25: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: exported method NodeController.Index should have comment or be unexported (golint)
    • Line 30: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 45: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 54: warning: exported method NodeController.AddAndEdit should have comment or be unexported (golint)
    • Line 54: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 67: warning: don't use underscores in Go names; var group_id should be groupID (golint)
    • Line 82: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 89: warning: exported method NodeController.DelNode should have comment or be unexported (golint)
    • Line 89: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 95: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rabbit/models/admin/NodeModel.go
    • Line 1: warning: package comment should be of the form "Package admin ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: exported type Node should have comment or be unexported (golint)
    • Line 36: warning: exported method Node.TableName should have comment or be unexported (golint)
    • Line 52: warning: exported function GetNodelist should have comment or be unexported (golint)
    • Line 52: warning: don't use underscores in Go names; func parameter page_size should be pageSize (golint)
    • Line 67: warning: exported function ReadNode should have comment or be unexported (golint)
    • Line 77: warning: exported function AddNode should have comment or be unexported (golint)
    • Line 95: warning: exported function UpdateNode should have comment or be unexported (golint)
    • Line 121: warning: exported function DelNodeById should have comment or be unexported (golint)
    • Line 128: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 135: warning: exported function GetNodelistByGroupid should have comment or be unexported (golint)
    • Line 146: warning: exported function GetNodeTree should have comment or be unexported (golint)
    • Line 158: warning: exported method Node.Insert should have comment or be unexported (golint)
    • Line 158: warning: receiver name m should be consistent with previous receiver name n for Node (golint)
    • Line 165: warning: receiver name m should be consistent with previous receiver name n for Node (golint)
    • Line 172: warning: exported method Node.Update should have comment or be unexported (golint)
    • Line 172: warning: receiver name m should be consistent with previous receiver name n for Node (golint)
    • Line 179: warning: exported method Node.Delete should have comment or be unexported (golint)
    • Line 179: warning: receiver name m should be consistent with previous receiver name n for Node (golint)
    • Line 186: warning: exported method Node.Query should have comment or be unexported (golint)
    • Line 186: warning: receiver name m should be consistent with previous receiver name n for Node (golint)
    • rabbit/controllers/admin/blog/paper.go
    • Line 5: warning: should not use dot imports (golint)
    • Line 9: warning: exported type PaperController should have comment or be unexported (golint)
    • Line 13: warning: exported method PaperController.Index should have comment or be unexported (golint)
    • Line 13: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 78: warning: exported method PaperController.AddPaper should have comment or be unexported (golint)
    • Line 78: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 134: warning: exported method PaperController.UpdatePaper should have comment or be unexported (golint)
    • Line 134: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 230: warning: exported method PaperController.DeletePaper should have comment or be unexported (golint)
    • Line 230: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 248: warning: exported method PaperController.RealDelPaper should have comment or be unexported (golint)
    • Line 248: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 264: warning: exported method PaperController.Rubbish should have comment or be unexported (golint)
    • Line 264: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • rabbit/conf/config.go
    • Line 1: warning: package comment should be of the form "Package conf ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: exported type FlagConfig should have comment or be unexported (golint)
    • Line 32: warning: exported var AuthType should have comment or be unexported (golint)
    • Line 52: warning: exported function InitConfig should have comment or be unexported (golint)
    • Line 76: warning: exported function ForTestInitConfig should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!