Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
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!
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!
Golint is a linter for Go source code.
-
golang-starter-pack/router/validator.go
- Line 5: warning: exported function NewValidator should have comment or be unexported (golint)
- Line 11: warning: exported type Validator should have comment or be unexported (golint)
- Line 15: warning: exported method Validator.Validate should have comment or be unexported (golint)
-
golang-starter-pack/db/db.go
- Line 11: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
- Line 14: warning: exported function New should have comment or be unexported (golint)
- Line 24: warning: exported function TestDB should have comment or be unexported (golint)
- Line 34: warning: exported function DropTestDB should have comment or be unexported (golint)
- Line 41: warning: comment on exported function AutoMigrate should be of the form "AutoMigrate ..." (golint)
-
golang-starter-pack/store/article.go
- Line 8: warning: exported type ArticleStore should have comment or be unexported (golint)
- Line 12: warning: exported function NewArticleStore should have comment or be unexported (golint)
- Line 18: warning: exported method ArticleStore.GetBySlug should have comment or be unexported (golint)
- Line 30: warning: exported method ArticleStore.GetUserArticleBySlug should have comment or be unexported (golint)
- Line 42: warning: exported method ArticleStore.CreateArticle should have comment or be unexported (golint)
- Line 67: warning: exported method ArticleStore.UpdateArticle should have comment or be unexported (golint)
- Line 93: warning: exported method ArticleStore.DeleteArticle should have comment or be unexported (golint)
- Line 97: warning: exported method ArticleStore.List should have comment or be unexported (golint)
- Line 107: warning: exported method ArticleStore.ListByTag should have comment or be unexported (golint)
- Line 122: warning: exported method ArticleStore.ListByAuthor should have comment or be unexported (golint)
- Line 138: warning: exported method ArticleStore.ListByWhoFavorited should have comment or be unexported (golint)
- Line 153: warning: exported method ArticleStore.ListFeed should have comment or be unexported (golint)
- Line 174: warning: exported method ArticleStore.AddComment should have comment or be unexported (golint)
- Line 182: warning: exported method ArticleStore.GetCommentsBySlug should have comment or be unexported (golint)
- Line 193: warning: exported method ArticleStore.GetCommentByID should have comment or be unexported (golint)
- Line 204: warning: exported method ArticleStore.DeleteComment should have comment or be unexported (golint)
- Line 208: warning: exported method ArticleStore.AddFavorite should have comment or be unexported (golint)
- Line 214: warning: exported method ArticleStore.RemoveFavorite should have comment or be unexported (golint)
- Line 220: warning: exported method ArticleStore.ListTags should have comment or be unexported (golint)
-
golang-starter-pack/model/user.go
- Line 10: warning: exported type User should have comment or be unexported (golint)
- Line 22: warning: exported type Follow should have comment or be unexported (golint)
- Line 29: warning: exported method User.HashPassword should have comment or be unexported (golint)
- Line 37: warning: exported method User.CheckPassword should have comment or be unexported (golint)
-
golang-starter-pack/router/middleware/jwt.go
- Line 13: warning: exported type JWTConfig should have comment or be unexported (golint)
- Line 17: warning: exported type Skipper should have comment or be unexported (golint)
- Line 22: warning: exported var ErrJWTMissing should have comment or be unexported (golint)
- Line 26: warning: exported function JWT should have comment or be unexported (golint)
- Line 32: warning: exported function JWTWithConfig should have comment or be unexported (golint)
-
golang-starter-pack/handler/user.go
- Line 11: warning: exported method Handler.SignUp should have comment or be unexported (golint)
- Line 23: warning: exported method Handler.Login should have comment or be unexported (golint)
- Line 41: warning: exported method Handler.CurrentUser should have comment or be unexported (golint)
- Line 52: warning: exported method Handler.UpdateUser should have comment or be unexported (golint)
- Line 71: warning: exported method Handler.GetProfile should have comment or be unexported (golint)
- Line 83: warning: exported method Handler.Follow should have comment or be unexported (golint)
- Line 98: warning: exported method Handler.Unfollow should have comment or be unexported (golint)
-
golang-starter-pack/store/user.go
- Line 8: warning: exported type UserStore should have comment or be unexported (golint)
- Line 12: warning: exported function NewUserStore should have comment or be unexported (golint)
- Line 18: warning: exported method UserStore.GetByID should have comment or be unexported (golint)
- Line 29: warning: exported method UserStore.GetByEmail should have comment or be unexported (golint)
- Line 40: warning: exported method UserStore.GetByUsername should have comment or be unexported (golint)
- Line 51: warning: exported method UserStore.Create should have comment or be unexported (golint)
- Line 55: warning: exported method UserStore.Update should have comment or be unexported (golint)
- Line 59: warning: exported method UserStore.AddFollower should have comment or be unexported (golint)
- Line 63: warning: exported method UserStore.RemoveFollower should have comment or be unexported (golint)
- Line 77: warning: exported method UserStore.IsFollower should have comment or be unexported (golint)
-
golang-starter-pack/model/article.go
- Line 7: warning: exported type Article should have comment or be unexported (golint)
- Line 20: warning: exported type Comment should have comment or be unexported (golint)
- Line 29: warning: exported type Tag should have comment or be unexported (golint)
-
golang-starter-pack/utils/errors.go
- Line 10: warning: exported type Error should have comment or be unexported (golint)
- Line 14: warning: exported function NewError should have comment or be unexported (golint)
- Line 26: warning: exported function NewValidatorError should have comment or be unexported (golint)
- Line 36: warning: exported function AccessForbidden should have comment or be unexported (golint)
- Line 43: warning: exported function NotFound should have comment or be unexported (golint)
-
golang-starter-pack/handler/article.go
- Line 13: warning: exported method Handler.GetArticle should have comment or be unexported (golint)
- Line 25: warning: exported method Handler.Articles should have comment or be unexported (golint)
- Line 63: warning: exported method Handler.Feed should have comment or be unexported (golint)
- Line 81: warning: exported method Handler.CreateArticle should have comment or be unexported (golint)
- Line 96: warning: exported method Handler.UpdateArticle should have comment or be unexported (golint)
- Line 116: warning: exported method Handler.DeleteArticle should have comment or be unexported (golint)
- Line 132: warning: exported method Handler.AddComment should have comment or be unexported (golint)
- Line 152: warning: exported method Handler.GetComments should have comment or be unexported (golint)
- Line 161: warning: exported method Handler.DeleteComment should have comment or be unexported (golint)
- Line 183: warning: exported method Handler.Favorite should have comment or be unexported (golint)
- Line 198: warning: exported method Handler.Unfavorite should have comment or be unexported (golint)
- Line 213: warning: exported method Handler.Tags should have comment or be unexported (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
No problems detected. Good job!
Misspell Finds commonly misspelled English words
No problems detected. Good job!