Preparing report...

Report for github.com/varconf/varconf-server

A    Great!    Found 27 issues across 28 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo92%

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.


golint3%

Golint is a linter for Go source code.

    • varconf-server/core/dao/common/time.go
    • Line 9: warning: exported type JsonTime should have comment or be unexported (golint)
    • Line 17: warning: exported function NowJsonTime should have comment or be unexported (golint)
    • Line 21: warning: exported method JsonTime.UnmarshalJSON should have comment or be unexported (golint)
    • Line 27: warning: exported method JsonTime.MarshalJSON should have comment or be unexported (golint)
    • Line 35: warning: exported method JsonTime.Value should have comment or be unexported (golint)
    • Line 43: warning: exported method JsonTime.Scan should have comment or be unexported (golint)
    • varconf-server/core/moudle/router/router.go
    • Line 22: warning: exported const CONNECT should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported const DEFAULT should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported const BIND should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: exported type Handler should have comment or be unexported (golint)
    • Line 46: warning: exported type Interceptor should have comment or be unexported (golint)
    • Line 51: warning: exported type Context should have comment or be unexported (golint)
    • Line 55: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 57: warning: exported type PathPattern should have comment or be unexported (golint)
    • Line 63: warning: exported type HandlerAdapter should have comment or be unexported (golint)
    • Line 70: warning: exported type InterceptorAdapter should have comment or be unexported (golint)
    • Line 76: warning: exported type ResolverAdapter should have comment or be unexported (golint)
    • Line 81: warning: exported type Router should have comment or be unexported (golint)
    • Line 91: warning: exported function NewRouter should have comment or be unexported (golint)
    • Line 102: warning: exported method Router.Run should have comment or be unexported (golint)
    • Line 119: warning: exported method Router.RunTLS should have comment or be unexported (golint)
    • Line 136: warning: exported method Router.Stop should have comment or be unexported (golint)
    • Line 143: warning: exported method Router.SetAddress should have comment or be unexported (golint)
    • Line 171: warning: exported method Router.SetTag should have comment or be unexported (golint)
    • Line 175: warning: exported method Router.SetLogger should have comment or be unexported (golint)
    • Line 179: warning: exported method Router.Connect should have comment or be unexported (golint)
    • Line 183: warning: exported method Router.Delete should have comment or be unexported (golint)
    • Line 187: warning: exported method Router.Get should have comment or be unexported (golint)
    • Line 191: warning: exported method Router.Head should have comment or be unexported (golint)
    • Line 195: warning: exported method Router.Options should have comment or be unexported (golint)
    • Line 199: warning: exported method Router.Patch should have comment or be unexported (golint)
    • Line 203: warning: exported method Router.Post should have comment or be unexported (golint)
    • Line 207: warning: exported method Router.Put should have comment or be unexported (golint)
    • Line 211: warning: exported method Router.Trace should have comment or be unexported (golint)
    • Line 215: warning: exported method Router.Any should have comment or be unexported (golint)
    • Line 219: warning: exported method Router.Static should have comment or be unexported (golint)
    • Line 250: warning: exported method Router.AddRoute should have comment or be unexported (golint)
    • Line 267: warning: exported method Router.AddFilter should have comment or be unexported (golint)
    • Line 292: warning: exported method Router.AddResolver should have comment or be unexported (golint)
    • varconf-server/core/service/user.go
    • Line 10: warning: exported type UserService should have comment or be unexported (golint)
    • Line 14: warning: exported function NewUserService should have comment or be unexported (golint)
    • Line 21: warning: exported method UserService.PageQuery should have comment or be unexported (golint)
    • Line 34: warning: exported method UserService.QueryUser should have comment or be unexported (golint)
    • Line 42: warning: exported method UserService.CreateUser should have comment or be unexported (golint)
    • Line 58: warning: exported method UserService.SelectedUpdateUser should have comment or be unexported (golint)
    • Line 68: warning: exported method UserService.DeleteUser should have comment or be unexported (golint)
    • varconf-server/core/web/controller/api.go
    • Line 14: warning: exported type ApiController should have comment or be unexported (golint)
    • Line 21: warning: exported type ConfigValue should have comment or be unexported (golint)
    • Line 27: warning: exported function InitApiController should have comment or be unexported (golint)
    • varconf-server/core/service/home.go
    • Line 8: warning: exported type HomeService should have comment or be unexported (golint)
    • Line 15: warning: exported function NewHomeService should have comment or be unexported (golint)
    • Line 25: warning: exported method HomeService.Overall should have comment or be unexported (golint)
    • varconf-server/core/web/interceptor/user.go
    • Line 10: warning: exported type UserAuthInterceptor should have comment or be unexported (golint)
    • Line 14: warning: exported function InitUserAuthInterceptor should have comment or be unexported (golint)
    • Line 22: warning: exported method UserAuthInterceptor.PreHandleFunc should have comment or be unexported (golint)
    • Line 40: warning: exported method UserAuthInterceptor.PostHandleFunc should have comment or be unexported (golint)
    • varconf-server/core/dao/config.go
    • Line 12: warning: exported type ConfigData should have comment or be unexported (golint)
    • Line 28: warning: exported type QueryConfigData should have comment or be unexported (golint)
    • Line 39: warning: comment on exported const STATUS_UN should be of the form "STATUS_UN ..." (golint)
    • Line 41: warning: exported const STATUS_IN should have comment (or a comment on this block) or be unexported (golint)
    • Line 45: warning: comment on exported const OPERATE_NEW should be of the form "OPERATE_NEW ..." (golint)
    • Line 47: warning: exported const OPERATE_UPDATE should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: exported type ConfigDao should have comment or be unexported (golint)
    • Line 55: warning: exported function NewConfigDao should have comment or be unexported (golint)
    • Line 60: warning: exported method ConfigDao.QueryConfigs should have comment or be unexported (golint)
    • Line 73: warning: exported method ConfigDao.CountConfigs should have comment or be unexported (golint)
    • Line 78: warning: exported method ConfigDao.InsertConfig should have comment or be unexported (golint)
    • Line 86: warning: exported method ConfigDao.SelectedUpdateConfig should have comment or be unexported (golint)
    • Line 95: warning: exported method ConfigDao.DeleteConfig should have comment or be unexported (golint)
    • Line 104: warning: exported method ConfigDao.BatchUpdateConfig should have comment or be unexported (golint)
    • Line 124: warning: exported method ConfigDao.BatchDeleteConfig should have comment or be unexported (golint)
    • varconf-server/core/service/app.go
    • Line 11: warning: exported type AppService should have comment or be unexported (golint)
    • Line 16: warning: exported function NewAppService should have comment or be unexported (golint)
    • Line 24: warning: exported method AppService.PageQuery should have comment or be unexported (golint)
    • Line 37: warning: exported method AppService.QueryApp should have comment or be unexported (golint)
    • Line 46: warning: exported method AppService.CreateApp should have comment or be unexported (golint)
    • Line 61: warning: exported method AppService.SelectedUpdateApp should have comment or be unexported (golint)
    • Line 71: warning: exported method AppService.DeleteApp should have comment or be unexported (golint)
    • varconf-server/core/service/config.go
    • Line 16: warning: exported type ConfigService should have comment or be unexported (golint)
    • Line 26: warning: exported function NewConfigService should have comment or be unexported (golint)
    • Line 39: warning: exported method ConfigService.PageQuery should have comment or be unexported (golint)
    • Line 52: warning: exported method ConfigService.QueryConfig should have comment or be unexported (golint)
    • Line 60: warning: exported method ConfigService.CreateConfig should have comment or be unexported (golint)
    • Line 74: warning: exported method ConfigService.UpdateConfig should have comment or be unexported (golint)
    • Line 87: warning: exported method ConfigService.DeleteConfig should have comment or be unexported (golint)
    • Line 100: warning: exported method ConfigService.ReleaseConfig should have comment or be unexported (golint)
    • Line 118: warning: exported method ConfigService.QueryRelease should have comment or be unexported (golint)
    • Line 131: warning: exported method ConfigService.CronRelease should have comment or be unexported (golint)
    • Line 201: warning: exported method ConfigService.PullRelease should have comment or be unexported (golint)
    • varconf-server/core/dao/common/dao.go
    • Line 12: warning: exported type Dao should have comment or be unexported (golint)
    • Line 17: warning: exported const TABLE should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported method Dao.Insert should have comment or be unexported (golint)
    • Line 30: warning: exported method Dao.InsertWithTx should have comment or be unexported (golint)
    • Line 54: warning: exported method Dao.Exec should have comment or be unexported (golint)
    • Line 62: warning: exported method Dao.ExecWithTx should have comment or be unexported (golint)
    • Line 82: warning: exported method Dao.Query should have comment or be unexported (golint)
    • Line 86: warning: exported method Dao.QueryWithTx should have comment or be unexported (golint)
    • Line 90: warning: exported method Dao.Count should have comment or be unexported (golint)
    • Line 100: warning: exported method Dao.StructInsert should have comment or be unexported (golint)
    • Line 116: warning: exported method Dao.StructInsertWithTx should have comment or be unexported (golint)
    • Line 153: warning: exported method Dao.StructBatchInsert should have comment or be unexported (golint)
    • Line 193: warning: exported method Dao.StructUpdateByPK should have comment or be unexported (golint)
    • Line 220: warning: exported method Dao.StructUpsert should have comment or be unexported (golint)
    • Line 233: warning: exported method Dao.StructUpsertWithTx should have comment or be unexported (golint)
    • Line 269: warning: exported method Dao.StructSelectByPK should have comment or be unexported (golint)
    • Line 289: warning: exported method Dao.StructSelectByPKWithTx should have comment or be unexported (golint)
    • Line 309: warning: exported method Dao.StructSelect should have comment or be unexported (golint)
    • varconf-server/core/dao/app.go
    • Line 11: warning: comment on exported type AppData should be of the form "AppData ..." (with optional leading article) (golint)
    • Line 23: warning: exported type QueryAppData should have comment or be unexported (golint)
    • Line 33: warning: exported type AppDao should have comment or be unexported (golint)
    • Line 37: warning: exported function NewAppDao should have comment or be unexported (golint)
    • Line 42: warning: exported method AppDao.QueryApps should have comment or be unexported (golint)
    • Line 55: warning: exported method AppDao.CountApps should have comment or be unexported (golint)
    • Line 60: warning: exported method AppDao.InsertApp should have comment or be unexported (golint)
    • Line 69: warning: exported method AppDao.SelectedUpdateApp should have comment or be unexported (golint)
    • Line 79: warning: exported method AppDao.DeleteApp should have comment or be unexported (golint)
    • Line 89: warning: exported method AppDao.ReleaseIndex should have comment or be unexported (golint)
    • varconf-server/core/dao/release.go
    • Line 12: warning: exported type ReleaseData should have comment or be unexported (golint)
    • Line 19: warning: exported type ReleaseDao should have comment or be unexported (golint)
    • Line 23: warning: exported function NewReleaseDao should have comment or be unexported (golint)
    • Line 28: warning: exported method ReleaseDao.QueryReleases should have comment or be unexported (golint)
    • Line 49: warning: exported method ReleaseDao.QueryRelease should have comment or be unexported (golint)
    • Line 61: warning: exported method ReleaseDao.InsertRelease should have comment or be unexported (golint)
    • Line 69: warning: exported method ReleaseDao.UpsertRelease should have comment or be unexported (golint)
    • Line 77: warning: exported method ReleaseDao.SelectedUpdateRelease should have comment or be unexported (golint)
    • varconf-server/core/moudle/poll/poll.go
    • Line 1: warning: package comment should be of the form "Package poll ..." (golint)
    • Line 9: warning: exported type Element should have comment or be unexported (golint)
    • Line 14: warning: exported method Element.Chan should have comment or be unexported (golint)
    • Line 18: warning: exported type MessagePoll should have comment or be unexported (golint)
    • Line 23: warning: exported function NewMessagePoll should have comment or be unexported (golint)
    • Line 29: warning: exported method MessagePoll.Poll should have comment or be unexported (golint)
    • Line 42: warning: exported method MessagePoll.Contain should have comment or be unexported (golint)
    • Line 53: warning: exported method MessagePoll.Keys should have comment or be unexported (golint)
    • Line 64: warning: exported method MessagePoll.Push should have comment or be unexported (golint)
    • Line 80: warning: exported method MessagePoll.Remove should have comment or be unexported (golint)
    • varconf-server/core/service/auth.go
    • Line 16: warning: exported type AuthService should have comment or be unexported (golint)
    • Line 22: warning: exported function NewAuthService should have comment or be unexported (golint)
    • Line 31: warning: exported method AuthService.Login should have comment or be unexported (golint)
    • Line 44: warning: exported method AuthService.Auth should have comment or be unexported (golint)
    • Line 74: warning: exported method AuthService.Gen should have comment or be unexported (golint)
    • Line 81: warning: exported method AuthService.ApiAuth should have comment or be unexported (golint)
    • varconf-server/core/dao/manage_tx.go
    • Line 14: warning: exported type ManageTxDao should have comment or be unexported (golint)
    • Line 18: warning: exported function NewManageTxDao should have comment or be unexported (golint)
    • Line 23: warning: exported method ManageTxDao.ReleaseConfig should have comment or be unexported (golint)
    • Line 86: warning: exported method ManageTxDao.DeleteApp should have comment or be unexported (golint)
    • varconf-server/core/dao/release_log.go
    • Line 9: warning: comment on exported type ReleaseLogData should be of the form "ReleaseLogData ..." (with optional leading article) (golint)
    • Line 19: warning: exported type QueryReleaseLogData should have comment or be unexported (golint)
    • Line 26: warning: exported type ReleaseLogDao should have comment or be unexported (golint)
    • Line 30: warning: exported function NewReleaseLogDao should have comment or be unexported (golint)
    • Line 35: warning: exported method ReleaseLogDao.QueryReleaseLogs should have comment or be unexported (golint)
    • Line 49: warning: exported method ReleaseLogDao.CountReleaseLogs should have comment or be unexported (golint)
    • Line 54: warning: exported method ReleaseLogDao.InsertReleaseLog should have comment or be unexported (golint)
    • varconf-server/core/dao/user.go
    • Line 12: warning: exported const USER_ORDINARY should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type UserData should have comment or be unexported (golint)
    • Line 25: warning: exported type QueryUserData should have comment or be unexported (golint)
    • Line 33: warning: exported type UserDao should have comment or be unexported (golint)
    • Line 37: warning: exported function NewUserDao should have comment or be unexported (golint)
    • Line 42: warning: exported method UserDao.QueryUsers should have comment or be unexported (golint)
    • Line 55: warning: exported method UserDao.CountUsers should have comment or be unexported (golint)
    • Line 60: warning: exported method UserDao.InsertUser should have comment or be unexported (golint)
    • Line 68: warning: exported method UserDao.SelectedUpdateUser should have comment or be unexported (golint)
    • Line 77: warning: exported method UserDao.DeleteUser should have comment or be unexported (golint)
    • varconf-server/core/web/common/controller.go
    • Line 8: warning: exported type Controller should have comment or be unexported (golint)
    • Line 11: warning: exported method Controller.ReadPageInfo should have comment or be unexported (golint)
    • Line 26: warning: exported method Controller.WritePageData should have comment or be unexported (golint)
    • varconf-server/core/web/interceptor/api.go
    • Line 10: warning: exported type ApiAuthInterceptor should have comment or be unexported (golint)
    • Line 14: warning: exported function InitApiAuthInterceptor should have comment or be unexported (golint)
    • Line 22: warning: exported method ApiAuthInterceptor.PreHandleFunc should have comment or be unexported (golint)
    • Line 40: warning: exported method ApiAuthInterceptor.PostHandleFunc should have comment or be unexported (golint)
    • varconf-server/core/web/common/common.go
    • Line 15: warning: exported const CODE_SUCCEED should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type ResponseData should have comment or be unexported (golint)
    • Line 25: warning: exported function ReadJson should have comment or be unexported (golint)
    • Line 34: warning: exported function WriteJson should have comment or be unexported (golint)
    • Line 46: warning: exported function WriteErrorResponse should have comment or be unexported (golint)
    • Line 51: warning: exported function WriteErrorResponseWithCode should have comment or be unexported (golint)
    • Line 56: warning: exported function WriteSucceedResponse should have comment or be unexported (golint)
    • varconf-server/cmd/start.go
    • Line 18: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 21: warning: exported type DatabaseInfo should have comment or be unexported (golint)
    • Line 26: warning: exported type ServerInfo should have comment or be unexported (golint)
    • Line 32: warning: exported type ServiceInfo should have comment or be unexported (golint)
    • Line 36: warning: exported type ConfigInfo should have comment or be unexported (golint)
    • Line 42: warning: exported function Start 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!