Preparing report...

Report for github.com/micro-company/go-auth

A    Great!    Found 23 issues across 24 files

Tweet

gofmt95%

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!


gocyclo100%

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.

No problems detected. Good job!


golint8%

Golint is a linter for Go source code.

    • go-auth/db/mongodb/mongo.go
    • Line 13: warning: exported var Session should have comment or be unexported (golint)
    • Line 24: warning: exported function ConnectToMongo should have comment or be unexported (golint)
    • go-auth/handlers/session/session.go
    • Line 53: warning: exported function Login should have comment or be unexported (golint)
    • Line 101: warning: exported function Registration should have comment or be unexported (golint)
    • Line 117: warning: exported function Logout should have comment or be unexported (golint)
    • Line 151: warning: exported function Refresh should have comment or be unexported (golint)
    • Line 186: warning: exported function Recovery should have comment or be unexported (golint)
    • Line 236: warning: exported function RecoveryByToken should have comment or be unexported (golint)
    • Line 285: warning: exported function Debug should have comment or be unexported (golint)
    • go-auth/utils/logger.go
    • Line 26: warning: don't use underscores in Go names; var err_str should be errStr (golint)
    • Line 39: warning: exported function NewStructuredLogger should have comment or be unexported (golint)
    • Line 43: warning: exported method StructuredLogger.NewLogEntry should have comment or be unexported (golint)
    • Line 80: warning: exported method StructuredLoggerEntry.Panic should have comment or be unexported (golint)
    • Line 94: warning: exported function GetLogEntry should have comment or be unexported (golint)
    • Line 99: warning: exported function LogEntrySetField should have comment or be unexported (golint)
    • Line 105: warning: exported function LogEntrySetFields should have comment or be unexported (golint)
    • go-auth/utils/types.go
    • Line 5: warning: exported type StructuredLogger should have comment or be unexported (golint)
    • Line 9: warning: exported type StructuredLoggerEntry should have comment or be unexported (golint)
    • go-auth/handlers/user/user.go
    • Line 44: warning: exported function List should have comment or be unexported (golint)
    • Line 65: warning: exported function Create should have comment or be unexported (golint)
    • Line 85: warning: don't use underscores in Go names; var is_err should be isErr (golint)
    • Line 107: warning: exported function Update should have comment or be unexported (golint)
    • Line 151: warning: exported function Delete should have comment or be unexported (golint)
    • go-auth/models/user/types.go
    • Line 1: warning: don't use MixedCaps in package name; userModel should be usermodel (golint)
    • Line 21: warning: exported type Profile should have comment or be unexported (golint)
    • go-auth/utils/crypto/crypto.go
    • Line 7: warning: exported function HashPassword should have comment or be unexported (golint)
    • Line 12: warning: exported function CheckPasswordHash should have comment or be unexported (golint)
    • go-auth/models/user/user.go
    • Line 1: warning: don't use MixedCaps in package name; userModel should be usermodel (golint)
    • Line 17: warning: error should be the last type when returning multiple items (golint)
    • Line 17: warning: exported function List should have comment or be unexported (golint)
    • Line 28: warning: exported function Find should have comment or be unexported (golint)
    • Line 39: warning: exported function FindOne should have comment or be unexported (golint)
    • Line 50: warning: exported function FindCount 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 Add should have comment or be unexported (golint)
    • Line 81: warning: exported function Update should have comment or be unexported (golint)
    • Line 95: warning: exported function Delete should have comment or be unexported (golint)
    • go-auth/models/session/session.go
    • Line 1: warning: don't use MixedCaps in package name; sessionModel should be sessionmodel (golint)
    • Line 16: warning: exported const PRIVATE_KEY should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported function NewAccessToken should have comment or be unexported (golint)
    • Line 75: warning: exported function NewRefreshToken should have comment or be unexported (golint)
    • Line 85: warning: exported function NewRecoveryLink should have comment or be unexported (golint)
    • Line 98: warning: exported function Delete should have comment or be unexported (golint)
    • Line 107: warning: exported function VerifyToken should have comment or be unexported (golint)
    • Line 124: warning: exported function CheckRefreshToken should have comment or be unexported (golint)
    • Line 138: warning: exported function GetValueByKey should have comment or be unexported (golint)
    • go-auth/grpc/server/server.go
    • Line 13: warning: exported var GrpcClient should have comment or be unexported (golint)
    • Line 37: warning: exported function GetConnClient should have comment or be unexported (golint)
    • go-auth/db/redis/redis.go
    • Line 12: warning: exported var Redis should have comment or be unexported (golint)
    • Line 23: warning: exported function ConnectToRedis 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!


misspell95%

Misspell Finds commonly misspelled English words