Preparing report...

Report for github.com/chenhg5/morningo

A    Great!    Found 19 issues across 25 files

Tweet

gofmt92%

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!


gocyclo96%

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.


golint32%

Golint is a linter for Go source code.

    • morningo/models/User.go
    • Line 5: warning: exported type User should have comment or be unexported (golint)
    • Line 12: warning: exported method User.TableName should have comment or be unexported (golint)
    • morningo/connections/database/sql.go
    • Line 13: warning: exported type Where should have comment or be unexported (golint)
    • Line 19: warning: exported type Join should have comment or be unexported (golint)
    • Line 26: warning: exported type RawUpdate should have comment or be unexported (golint)
    • Line 31: warning: exported type Sql should have comment or be unexported (golint)
    • Line 46: warning: exported var SqlPool should have comment or be unexported (golint)
    • Line 61: warning: exported type H should have comment or be unexported (golint)
    • Line 71: warning: exported function Table should have comment or be unexported (golint)
    • Line 77: warning: exported function SetTx should have comment or be unexported (golint)
    • Line 83: warning: exported method Sql.Table should have comment or be unexported (golint)
    • Line 88: warning: exported method Sql.Select should have comment or be unexported (golint)
    • Line 93: warning: exported method Sql.OrderBy should have comment or be unexported (golint)
    • Line 107: warning: exported method Sql.Skip should have comment or be unexported (golint)
    • Line 112: warning: exported method Sql.Take should have comment or be unexported (golint)
    • Line 117: warning: exported method Sql.Where should have comment or be unexported (golint)
    • Line 127: warning: exported method Sql.WhereIn should have comment or be unexported (golint)
    • Line 146: warning: exported method Sql.WhereNotIn should have comment or be unexported (golint)
    • Line 165: warning: exported method Sql.Find should have comment or be unexported (golint)
    • Line 169: warning: exported method Sql.Count should have comment or be unexported (golint)
    • Line 180: warning: exported method Sql.WhereRaw should have comment or be unexported (golint)
    • Line 185: warning: exported method Sql.UpdateRaw should have comment or be unexported (golint)
    • Line 193: warning: exported method Sql.LeftJoin should have comment or be unexported (golint)
    • Line 210: warning: exported method Sql.First should have comment or be unexported (golint)
    • Line 224: warning: exported method Sql.All should have comment or be unexported (golint)
    • Line 235: warning: exported method Sql.Update should have comment or be unexported (golint)
    • Line 259: warning: exported method Sql.Exec should have comment or be unexported (golint)
    • Line 283: warning: exported method Sql.Delete should have comment or be unexported (golint)
    • Line 307: warning: exported method Sql.Insert should have comment or be unexported (golint)
    • Line 427: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 502: warning: exported function RecycleSql should have comment or be unexported (golint)
    • morningo/filters/auth/auth.go
    • Line 10: warning: exported const JwtAuthDriverKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type Auth should have comment or be unexported (golint)
    • Line 26: warning: exported function RegisterGlobalAuthDriver should have comment or be unexported (golint)
    • Line 33: warning: exported function Middleware should have comment or be unexported (golint)
    • Line 45: warning: exported function GenerateAuthDriver should have comment or be unexported (golint)
    • Line 49: warning: exported function GetCurUser should have comment or be unexported (golint)
    • morningo/controllers/MainController.go
    • Line 17: warning: exported function IndexApi should have comment or be unexported (golint)
    • Line 25: warning: exported function DBExample should have comment or be unexported (golint)
    • Line 68: warning: exported function StoreExample should have comment or be unexported (golint)
    • Line 91: warning: exported function OrmExample should have comment or be unexported (golint)
    • Line 117: warning: exported function CookieSetExample should have comment or be unexported (golint)
    • Line 140: warning: exported function CookieGetExample should have comment or be unexported (golint)
    • Line 159: warning: exported function JwtSetExample should have comment or be unexported (golint)
    • Line 173: warning: exported function JwtGetExample should have comment or be unexported (golint)
    • morningo/config/config.go
    • Line 8: warning: exported type Env should have comment or be unexported (golint)
    • Line 40: warning: exported function GetEnv should have comment or be unexported (golint)
    • morningo/config/cookie.go
    • Line 3: warning: exported type CookieConfig should have comment or be unexported (golint)
    • Line 7: warning: exported function GetCookieConfig should have comment or be unexported (golint)
    • morningo/config/jwt.go
    • Line 5: warning: exported type JwtConfig should have comment or be unexported (golint)
    • Line 11: warning: exported function GetJwtConfig should have comment or be unexported (golint)
    • morningo/filters/filters.go
    • Line 12: warning: exported function RegisterSession should have comment or be unexported (golint)
    • Line 22: warning: exported function RegisterCache should have comment or be unexported (golint)
    • morningo/connections/database/mysql/mysql.go
    • Line 6: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 12: warning: exported type SqlTxStruct should have comment or be unexported (golint)
    • Line 18: warning: exported var SqlDB should have comment or be unexported (golint)
    • Line 67: warning: exported function QueryWithConnection should have comment or be unexported (golint)
    • Line 117: warning: exported function Query should have comment or be unexported (golint)
    • Line 167: warning: exported function Exec should have comment or be unexported (golint)
    • Line 183: warning: exported function BeginTransactionsWithReadUncommitted should have comment or be unexported (golint)
    • Line 187: warning: exported function BeginTransactionsWithReadCommitted should have comment or be unexported (golint)
    • Line 191: warning: exported function BeginTransactionsWithRepeatableRead should have comment or be unexported (golint)
    • Line 195: warning: exported function BeginTransactions should have comment or be unexported (golint)
    • Line 199: warning: exported function BeginTransactionsWithLevel should have comment or be unexported (golint)
    • Line 212: warning: exported method SqlTxStruct.Exec should have comment or be unexported (golint)
    • Line 227: warning: exported method SqlTxStruct.Query should have comment or be unexported (golint)
    • Line 269: warning: exported type TxFn should have comment or be unexported (golint)
    • Line 271: warning: error should be the last type when returning multiple items (golint)
    • Line 271: warning: exported function WithTransactionByLevel should have comment or be unexported (golint)
    • Line 293: warning: error should be the last type when returning multiple items (golint)
    • Line 293: warning: exported function WithTransaction should have comment or be unexported (golint)
    • Line 315: warning: exported function SetColVarType should have comment or be unexported (golint)
    • Line 377: warning: exported function SetResultValue should have comment or be unexported (golint)
    • morningo/connections/redis/redis.go
    • Line 9: warning: exported type ClientType should have comment or be unexported (golint)
    • Line 13: warning: exported var Client should have comment or be unexported (golint)
    • Line 23: warning: exported method ClientType.Set should have comment or be unexported (golint)
    • Line 31: warning: exported method ClientType.Incr should have comment or be unexported (golint)
    • Line 39: warning: exported method ClientType.Pipeline should have comment or be unexported (golint)
    • Line 43: warning: exported method ClientType.Decr should have comment or be unexported (golint)
    • Line 51: warning: exported method ClientType.DecrBy should have comment or be unexported (golint)
    • Line 59: warning: exported method ClientType.Expire should have comment or be unexported (golint)
    • Line 67: warning: exported method ClientType.Get should have comment or be unexported (golint)
    • Line 81: warning: exported method ClientType.IsExist should have comment or be unexported (golint)
    • Line 86: warning: exported method ClientType.Lpop should have comment or be unexported (golint)
    • Line 100: warning: exported method ClientType.Lpush should have comment or be unexported (golint)
    • Line 106: warning: exported method ClientType.Lrange should have comment or be unexported (golint)
    • Line 116: warning: exported method ClientType.Del should have comment or be unexported (golint)
    • Line 124: warning: exported method ClientType.SetIfNotExist should have comment or be unexported (golint)
    • Line 132: warning: exported method ClientType.PSubscribe should have comment or be unexported (golint)
    • morningo/modules/log/log.go
    • Line 33: warning: exported var ErrorWriter should have comment or be unexported (golint)
    • Line 38: warning: don't use underscores in Go names; const LeveL_WARNING should be LeveLWARNING (golint)
    • Line 38: warning: exported const LeveL_WARNING should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: don't use underscores in Go names; const LeveL_INFO should be LeveLINFO (golint)
    • Line 40: warning: don't use underscores in Go names; const LeveL_DEBUG should be LeveLDEBUG (golint)
    • Line 41: warning: don't use underscores in Go names; const LeveL_ERROR should be LeveLERROR (golint)
    • Line 42: warning: don't use underscores in Go names; const LeveL_SERIOUS should be LeveLSERIOUS (golint)
    • Line 45: warning: exported type E should have comment or be unexported (golint)
    • Line 54: warning: exported type M should have comment or be unexported (golint)
    • Line 60: warning: exported function InitAllLogger should have comment or be unexported (golint)
    • Line 77: warning: exported function InitLogger should have comment or be unexported (golint)
    • Line 84: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 89: warning: exported function Error should have comment or be unexported (golint)
    • Line 100: warning: exported function Info should have comment or be unexported (golint)
    • Line 133: warning: exported function Println should have comment or be unexported (golint)
    • Line 139: warning: exported function Printf should have comment or be unexported (golint)
    • morningo/filters/auth/drivers/jwt.go
    • Line 22: warning: exported function NewJwtAuthDriver should have comment or be unexported (golint)
    • Line 85: 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)

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!