Preparing report...

Report for github.com/Hendra-Huang/go-standard-layout

A    Great!    Found 24 issues across 42 files

Tweet

gofmt80%

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!


golint54%

Golint is a linter for Go source code.

    • go-standard-layout/server/handler/article.go
    • Line 16: warning: exported type ArticleServicer should have comment or be unexported (golint)
    • Line 20: warning: exported type ArticleHandler should have comment or be unexported (golint)
    • Line 25: warning: exported function NewArticleHandler should have comment or be unexported (golint)
    • Line 29: warning: exported method ArticleHandler.GetAllArticlesByUserID should have comment or be unexported (golint)
    • go-standard-layout/server/handler/ping.go
    • Line 8: warning: exported type PingHandler should have comment or be unexported (golint)
    • Line 11: warning: exported function NewPingHandler should have comment or be unexported (golint)
    • Line 15: warning: exported method PingHandler.Ping should have comment or be unexported (golint)
    • go-standard-layout/article.go
    • Line 10: warning: exported type Article should have comment or be unexported (golint)
    • Line 16: warning: exported type ArticleService should have comment or be unexported (golint)
    • Line 21: warning: exported type ArticleRepository should have comment or be unexported (golint)
    • Line 27: warning: exported function NewArticleService should have comment or be unexported (golint)
    • Line 34: warning: exported method ArticleService.FindByUserID should have comment or be unexported (golint)
    • go-standard-layout/log/logger.go
    • Line 21: warning: exported type Level should have comment or be unexported (golint)
    • Line 24: warning: exported const DebugLevel should have comment (or a comment on this block) or be unexported (golint)
    • Line 67: warning: exported type Format should have comment or be unexported (golint)
    • Line 70: warning: exported const FmtFormat should have comment (or a comment on this block) or be unexported (golint)
    • Line 74: warning: exported type Logger should have comment or be unexported (golint)
    • Line 99: warning: exported function NewDefaultLogger should have comment or be unexported (golint)
    • Line 154: warning: exported method Logger.Debug should have comment or be unexported (golint)
    • Line 158: warning: exported method Logger.Debugf should have comment or be unexported (golint)
    • Line 162: warning: exported method Logger.Print should have comment or be unexported (golint)
    • Line 166: warning: exported method Logger.Printf should have comment or be unexported (golint)
    • Line 170: warning: exported method Logger.Info should have comment or be unexported (golint)
    • Line 174: warning: exported method Logger.Infof should have comment or be unexported (golint)
    • Line 178: warning: exported method Logger.Warn should have comment or be unexported (golint)
    • Line 182: warning: exported method Logger.Warnf should have comment or be unexported (golint)
    • Line 190: warning: exported method Logger.Errorf should have comment or be unexported (golint)
    • Line 207: warning: exported method Logger.Fatal should have comment or be unexported (golint)
    • Line 211: warning: exported method Logger.Fatalf should have comment or be unexported (golint)
    • go-standard-layout/mysql/article.go
    • Line 17: warning: exported type ArticleRepository should have comment or be unexported (golint)
    • Line 25: warning: exported function NewArticleRepository should have comment or be unexported (golint)
    • Line 45: warning: exported method ArticleRepository.FindByUserID should have comment or be unexported (golint)
    • Line 62: warning: exported method ArticleRepository.Create should have comment or be unexported (golint)
    • go-standard-layout/env/env.go
    • Line 5: warning: exported type Environment should have comment or be unexported (golint)
    • Line 12: warning: exported const Development should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported function App should have comment or be unexported (golint)
    • Line 28: warning: exported function Get should have comment or be unexported (golint)
    • Line 32: warning: exported function GetWithDefault should have comment or be unexported (golint)
    • go-standard-layout/mock/user.go
    • Line 10: warning: exported type UserRepository should have comment or be unexported (golint)
    • Line 12: warning: exported method UserRepository.FindAll should have comment or be unexported (golint)
    • Line 29: warning: exported method UserRepository.FindByID should have comment or be unexported (golint)
    • Line 39: warning: exported method UserRepository.Create should have comment or be unexported (golint)
    • Line 43: warning: exported type UserRepositoryWithError should have comment or be unexported (golint)
    • Line 45: warning: exported method UserRepositoryWithError.FindAll should have comment or be unexported (golint)
    • Line 49: warning: exported method UserRepositoryWithError.FindByID should have comment or be unexported (golint)
    • Line 55: warning: exported method UserRepositoryWithError.Create should have comment or be unexported (golint)
    • go-standard-layout/log/log.go
    • Line 29: warning: exported function SetLevel should have comment or be unexported (golint)
    • Line 33: warning: exported function Debug should have comment or be unexported (golint)
    • Line 37: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 41: warning: exported function Info should have comment or be unexported (golint)
    • Line 45: warning: exported function Infof should have comment or be unexported (golint)
    • Line 49: warning: exported function Warn should have comment or be unexported (golint)
    • Line 53: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 57: warning: exported function Error should have comment or be unexported (golint)
    • Line 61: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 65: warning: exported function Errors should have comment or be unexported (golint)
    • Line 69: warning: exported function Fatal should have comment or be unexported (golint)
    • Line 73: warning: exported function Fatalf should have comment or be unexported (golint)
    • Line 77: warning: exported function WithFields should have comment or be unexported (golint)
    • go-standard-layout/server/handler/user.go
    • Line 17: warning: exported type UserServicer should have comment or be unexported (golint)
    • Line 22: warning: exported type UserHandler should have comment or be unexported (golint)
    • Line 27: warning: exported function NewUserHandler should have comment or be unexported (golint)
    • Line 31: warning: exported method UserHandler.GetAllUsers should have comment or be unexported (golint)
    • Line 44: warning: exported method UserHandler.GetUserByID should have comment or be unexported (golint)
    • Line 69: warning: exported method UserHandler.CreateUser should have comment or be unexported (golint)
    • go-standard-layout/server/handler/mock/user.go
    • Line 10: warning: exported type UserService should have comment or be unexported (golint)
    • Line 12: warning: exported method UserService.FindAll should have comment or be unexported (golint)
    • Line 19: warning: exported method UserService.FindByID should have comment or be unexported (golint)
    • Line 23: warning: exported type UserServiceWithError should have comment or be unexported (golint)
    • Line 25: warning: exported method UserServiceWithError.FindAll should have comment or be unexported (golint)
    • Line 29: warning: exported method UserServiceWithError.FindByID should have comment or be unexported (golint)
    • go-standard-layout/mock/article.go
    • Line 10: warning: exported type ArticleRepository should have comment or be unexported (golint)
    • Line 12: warning: exported method ArticleRepository.FindByUserID should have comment or be unexported (golint)
    • Line 29: warning: exported type ArticleRepositoryWithError should have comment or be unexported (golint)
    • Line 31: warning: exported method ArticleRepositoryWithError.FindByUserID should have comment or be unexported (golint)
    • go-standard-layout/mysql/user.go
    • Line 19: warning: exported type UserRepository should have comment or be unexported (golint)
    • Line 27: warning: exported function NewUserRepository should have comment or be unexported (golint)
    • Line 50: warning: exported method UserRepository.FindAll should have comment or be unexported (golint)
    • Line 66: warning: exported method UserRepository.FindByID should have comment or be unexported (golint)
    • Line 86: warning: exported method UserRepository.Create should have comment or be unexported (golint)
    • go-standard-layout/user.go
    • Line 10: warning: exported type User should have comment or be unexported (golint)
    • Line 16: warning: exported type UserService should have comment or be unexported (golint)
    • Line 21: warning: exported type UserRepository should have comment or be unexported (golint)
    • Line 28: warning: exported function NewUserService should have comment or be unexported (golint)
    • Line 35: warning: exported method UserService.FindAll should have comment or be unexported (golint)
    • Line 45: warning: exported method UserService.FindByID should have comment or be unexported (golint)
    • go-standard-layout/server/handler/mock/article.go
    • Line 10: warning: exported type ArticleService should have comment or be unexported (golint)
    • Line 12: warning: exported method ArticleService.FindByUserID should have comment or be unexported (golint)
    • Line 19: warning: exported type ArticleServiceWithError should have comment or be unexported (golint)
    • Line 21: warning: exported method ArticleServiceWithError.FindByUserID should have comment or be unexported (golint)

license0%

Checks whether your project has a LICENSE file.


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!