Preparing report...

Report for github.com/vardius/go-api-boilerplate

A+    Excellent!    Found 45 issues across 192 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!


gocyclo98%

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.


golint77%

Golint is a linter for Go source code.

    • go-api-boilerplate/pkg/eventstore/mongo/dto.go
    • Line 14: warning: exported type DTO should have comment or be unexported (golint)
    • Line 26: warning: exported type EventMetadataDTO should have comment or be unexported (golint)
    • Line 33: warning: exported method DTO.ToEvent should have comment or be unexported (golint)
    • Line 74: warning: exported function NewDTOFromEvent should have comment or be unexported (golint)
    • go-api-boilerplate/pkg/log/logger.go
    • Line 16: warning: comment on exported const TraceIDPrefix should be of the form "TraceIDPrefix ..." (golint)
    • Line 37: warning: exported method Logger.Debug should have comment or be unexported (golint)
    • Line 47: warning: exported method Logger.Info should have comment or be unexported (golint)
    • Line 57: warning: exported method Logger.Warning should have comment or be unexported (golint)
    • Line 77: warning: exported method Logger.Critical should have comment or be unexported (golint)
    • go-api-boilerplate/pkg/mongo/json.go
    • Line 11: warning: exported type JSONRawMessage should have comment or be unexported (golint)
    • Line 13: warning: exported method JSONRawMessage.MarshalBSONValue should have comment or be unexported (golint)
    • Line 17: warning: exported method JSONRawMessage.UnmarshalBSONValue should have comment or be unexported (golint)
    • go-api-boilerplate/pkg/http/response/json/json.go
    • Line 1: warning: package comment should be of the form "Package json ..." (golint)
    • Line 16: warning: exported type HandlerFunc should have comment or be unexported (golint)
    • Line 61: warning: exported function NotFound should have comment or be unexported (golint)
    • Line 74: warning: exported function NotAllowed should have comment or be unexported (golint)
    • go-api-boilerplate/cmd/user/internal/interfaces/http/handlers/user.go
    • Line 21: warning: comment on exported function BuildUserCommandDispatchHandler should be of the form "BuildUserCommandDispatchHandler ..." (golint)
    • Line 58: warning: comment on exported function BuildMeHandler should be of the form "BuildMeHandler ..." (golint)
    • Line 78: warning: comment on exported function BuildGetUserHandler should be of the form "BuildGetUserHandler ..." (golint)
    • Line 101: warning: comment on exported function BuildListUserHandler should be of the form "BuildListUserHandler ..." (golint)
    • go-api-boilerplate/cmd/auth/internal/domain/token/events.go
    • Line 13: warning: exported var WasCreatedType should have comment or be unexported (golint)
    • Line 36: warning: exported method WasCreated.GetUserAgent should have comment or be unexported (golint)
    • Line 40: warning: exported method WasCreated.GetData should have comment or be unexported (golint)
    • Line 44: warning: exported method WasCreated.TokenInfo should have comment or be unexported (golint)
    • go-api-boilerplate/cmd/auth/internal/infrastructure/persistence/mongo/client_model.go
    • Line 18: warning: exported method Client.GetID should have comment or be unexported (golint)
    • Line 22: warning: exported method Client.GetUserID should have comment or be unexported (golint)
    • Line 26: warning: exported method Client.GetSecret should have comment or be unexported (golint)
    • Line 30: warning: exported method Client.GetDomain should have comment or be unexported (golint)
    • Line 34: warning: exported method Client.GetRedirectURL should have comment or be unexported (golint)
    • Line 38: warning: exported method Client.GetScopes should have comment or be unexported (golint)
    • Line 42: warning: exported method Client.ClientInfo should have comment or be unexported (golint)
    • go-api-boilerplate/cmd/auth/internal/infrastructure/persistence/mysql/client_model.go
    • Line 21: warning: exported method Client.GetID should have comment or be unexported (golint)
    • Line 25: warning: exported method Client.GetUserID should have comment or be unexported (golint)
    • Line 29: warning: exported method Client.GetSecret should have comment or be unexported (golint)
    • Line 33: warning: exported method Client.GetDomain should have comment or be unexported (golint)
    • Line 37: warning: exported method Client.GetRedirectURL should have comment or be unexported (golint)
    • Line 41: warning: exported method Client.GetScopes should have comment or be unexported (golint)
    • Line 45: warning: exported method Client.ClientInfo should have comment or be unexported (golint)
    • go-api-boilerplate/cmd/user/internal/domain/user/events.go
    • Line 12: warning: exported var AccessTokenWasRequestedType should have comment or be unexported (golint)
    • Line 76: warning: comment on exported method WasRegisteredWithEmail.GetRole should be of the form "GetRole ..." (golint)
    • Line 115: warning: comment on exported method WasRegisteredWithFacebook.GetRole should be of the form "GetRole ..." (golint)
    • Line 167: warning: comment on exported method WasRegisteredWithGoogle.GetRole should be of the form "GetRole ..." (golint)
    • go-api-boilerplate/pkg/domain/factory.go
    • Line 11: warning: exported function RegisterEventFactory should have comment or be unexported (golint)
    • Line 26: warning: exported function UnregisterEventData should have comment or be unexported (golint)
    • Line 41: warning: exported function NewRawEvent should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words