Preparing report...

Report for github.com/allaboutapps/go-starter

A+    Excellent!    Found 67 issues across 159 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!


gocyclo94%

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.


golint59%

Golint is a linter for Go source code.

    • go-starter/internal/api/middleware/cache_control.go
    • Line 12: warning: exported var DefaultCacheControlConfig should have comment or be unexported (golint)
    • Line 17: warning: exported type CacheControlConfig should have comment or be unexported (golint)
    • Line 21: warning: exported function CacheControl should have comment or be unexported (golint)
    • Line 25: warning: exported function CacheControlWithConfig should have comment or be unexported (golint)
    • go-starter/internal/util/cache_control.go
    • Line 8: warning: exported type CacheControlDirective should have comment or be unexported (golint)
    • Line 11: warning: exported const CacheControlDirectiveNoCache should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported method CacheControlDirective.HasDirective should have comment or be unexported (golint)
    • Line 16: warning: exported method CacheControlDirective.AddDirective should have comment or be unexported (golint)
    • Line 17: warning: exported method CacheControlDirective.ClearDirective should have comment or be unexported (golint)
    • Line 18: warning: exported method CacheControlDirective.ToggleDirective should have comment or be unexported (golint)
    • Line 33: warning: exported function ParseCacheControlDirective should have comment or be unexported (golint)
    • Line 45: warning: exported function ParseCacheControlHeader should have comment or be unexported (golint)
    • Line 56: warning: exported function CacheControlDirectiveFromContext should have comment or be unexported (golint)
    • go-starter/internal/test/helper_compare.go
    • Line 15: warning: exported function CompareFileHashes should have comment or be unexported (golint)
    • Line 37: warning: exported function CompareAllPayload should have comment or be unexported (golint)
    • Line 63: warning: exported function CompareAll should have comment or be unexported (golint)
    • go-starter/internal/push/service.go
    • Line 12: warning: exported type ProviderType should have comment or be unexported (golint)
    • Line 15: warning: exported const ProviderTypeFCM should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type Service should have comment or be unexported (golint)
    • Line 24: warning: exported type ProviderSendResponse should have comment or be unexported (golint)
    • Line 36: warning: exported type Provider should have comment or be unexported (golint)
    • Line 42: warning: exported function New should have comment or be unexported (golint)
    • Line 49: warning: exported method Service.RegisterProvider should have comment or be unexported (golint)
    • Line 53: warning: exported method Service.ResetProviders should have comment or be unexported (golint)
    • Line 57: warning: exported method Service.GetProviderCount should have comment or be unexported (golint)
    • Line 61: warning: exported method Service.SendToUser should have comment or be unexported (golint)
    • go-starter/internal/util/db/order_by.go
    • Line 11: warning: exported function OrderBy should have comment or be unexported (golint)
    • Line 15: warning: exported function OrderByLower should have comment or be unexported (golint)
    • Line 19: warning: exported type OrderByNulls should have comment or be unexported (golint)
    • Line 22: warning: exported const OrderByNullsFirst should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported function OrderByWithNulls should have comment or be unexported (golint)
    • Line 30: warning: exported function OrderByLowerWithNulls should have comment or be unexported (golint)
    • go-starter/internal/config/mailer_config.go
    • Line 3: warning: exported type MailerTransporter should have comment or be unexported (golint)
    • Line 6: warning: exported var MailerTransporterMock should have comment or be unexported (golint)
    • Line 14: warning: exported type Mailer should have comment or be unexported (golint)
    • go-starter/internal/test/helper_request.go
    • Line 18: warning: exported type GenericPayload should have comment or be unexported (golint)
    • Line 19: warning: exported type GenericArrayPayload should have comment or be unexported (golint)
    • Line 21: warning: exported method GenericPayload.Reader should have comment or be unexported (golint)
    • Line 32: warning: exported method GenericArrayPayload.Reader should have comment or be unexported (golint)
    • Line 43: warning: exported function PerformRequestWithParams should have comment or be unexported (golint)
    • Line 53: warning: exported function PerformRequestWithArrayAndParams should have comment or be unexported (golint)
    • Line 63: warning: exported function PerformRequestWithRawBody should have comment or be unexported (golint)
    • Line 91: warning: exported function PerformRequest should have comment or be unexported (golint)
    • Line 97: warning: exported function PerformRequestWithArray should have comment or be unexported (golint)
    • Line 103: warning: exported function ParseResponseBody should have comment or be unexported (golint)
    • Line 111: warning: exported function ParseResponseAndValidate should have comment or be unexported (golint)
    • Line 121: warning: exported function HeadersWithAuth should have comment or be unexported (golint)
    • Line 127: warning: exported function HeadersWithConfigurableAuth should have comment or be unexported (golint)
    • go-starter/internal/test/test_mailer.go
    • Line 12: warning: exported const TestMailerDefaultSender should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported function NewTestMailer should have comment or be unexported (golint)
    • Line 21: warning: exported function NewSMTPMailerFromDefaultEnv should have comment or be unexported (golint)
    • Line 28: warning: exported function GetTestMailerMockTransport should have comment or be unexported (golint)
    • go-starter/internal/util/env.go
    • Line 22: warning: exported function GetEnv should have comment or be unexported (golint)
    • Line 30: warning: exported function GetEnvEnum should have comment or be unexported (golint)
    • Line 48: warning: exported function GetEnvAsInt should have comment or be unexported (golint)
    • Line 58: warning: exported function GetEnvAsUint32 should have comment or be unexported (golint)
    • Line 68: warning: exported function GetEnvAsUint8 should have comment or be unexported (golint)
    • Line 78: warning: exported function GetEnvAsBool should have comment or be unexported (golint)
    • Line 115: warning: exported function GetEnvAsURL should have comment or be unexported (golint)
    • go-starter/internal/api/server.go
    • Line 21: warning: exported type Router should have comment or be unexported (golint)
    • Line 29: warning: exported type Server should have comment or be unexported (golint)
    • Line 38: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 51: warning: exported method Server.Ready should have comment or be unexported (golint)
    • Line 59: warning: exported method Server.InitDB should have comment or be unexported (golint)
    • Line 84: warning: exported method Server.InitMailer should have comment or be unexported (golint)
    • Line 98: warning: exported method Server.InitPush should have comment or be unexported (golint)
    • Line 122: warning: exported method Server.Start should have comment or be unexported (golint)
    • Line 130: warning: exported method Server.Shutdown should have comment or be unexported (golint)
    • go-starter/internal/util/http.go
    • Line 22: warning: exported const HTTPHeaderCacheControl should have comment (or a comment on this block) or be unexported (golint)
    • Line 155: warning: exported function ParseFileUpload should have comment or be unexported (golint)
    • go-starter/internal/util/db/db.go
    • Line 12: warning: exported type TxFn should have comment or be unexported (golint)
    • Line 14: warning: exported function WithTransaction should have comment or be unexported (golint)
    • Line 18: warning: exported function WithConfiguredTransaction should have comment or be unexported (golint)
    • Line 53: warning: exported function NullIntFromInt64Ptr should have comment or be unexported (golint)
    • Line 60: warning: exported function NullFloat32FromFloat64Ptr should have comment or be unexported (golint)
    • go-starter/internal/util/time.go
    • Line 6: warning: exported const DateFormat should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported function DateFromString should have comment or be unexported (golint)
    • Line 18: warning: exported function EndOfMonth should have comment or be unexported (golint)
    • Line 22: warning: exported function EndOfDay should have comment or be unexported (golint)
    • Line 26: warning: exported function StartOfMonth should have comment or be unexported (golint)
    • Line 30: warning: exported function StartOfQuarter should have comment or be unexported (golint)
    • Line 47: warning: exported function Date should have comment or be unexported (golint)
    • Line 51: warning: exported function AddWeeks should have comment or be unexported (golint)
    • Line 55: warning: exported function AddMonths should have comment or be unexported (golint)
    • Line 59: warning: exported function DayBefore should have comment or be unexported (golint)
    • Line 63: warning: exported function TruncateTime should have comment or be unexported (golint)
    • go-starter/internal/util/string.go
    • Line 56: warning: exported type CharRange should have comment or be unexported (golint)
    • Line 59: warning: exported const CharRangeNumeric should have comment (or a comment on this block) or be unexported (golint)
    • go-starter/internal/mailer/transport/mock.go
    • Line 9: warning: exported type MockMailTransport should have comment or be unexported (golint)
    • Line 14: warning: exported function NewMock should have comment or be unexported (golint)
    • Line 21: warning: exported method MockMailTransport.Send should have comment or be unexported (golint)
    • Line 30: warning: exported method MockMailTransport.GetLastSentMail should have comment or be unexported (golint)
    • Line 41: warning: exported method MockMailTransport.GetSentMails should have comment or be unexported (golint)
    • go-starter/internal/api/router/error_handler.go
    • Line 16: warning: exported var DefaultHTTPErrorHandlerConfig should have comment or be unexported (golint)
    • Line 21: warning: exported type HTTPErrorHandlerConfig should have comment or be unexported (golint)
    • Line 25: warning: exported function HTTPErrorHandler should have comment or be unexported (golint)
    • Line 29: warning: exported function HTTPErrorHandlerWithConfig should have comment or be unexported (golint)
    • go-starter/internal/mailer/transport/smtp.go
    • Line 11: warning: exported type SMTPMailTransport should have comment or be unexported (golint)
    • Line 17: warning: exported function NewSMTP should have comment or be unexported (golint)
    • Line 36: warning: exported method SMTPMailTransport.Send should have comment or be unexported (golint)
    • go-starter/internal/config/server_config.go
    • Line 20: warning: exported type EchoServer should have comment or be unexported (golint)
    • Line 35: warning: exported type PprofServer should have comment or be unexported (golint)
    • Line 56: warning: exported type AuthServer should have comment or be unexported (golint)
    • Line 63: warning: exported type PathsServer should have comment or be unexported (golint)
    • Line 68: warning: exported type ManagementServer should have comment or be unexported (golint)
    • Line 76: warning: exported type FrontendServer should have comment or be unexported (golint)
    • Line 81: warning: exported type LoggerServer should have comment or be unexported (golint)
    • Line 92: warning: exported type Server should have comment or be unexported (golint)
    • go-starter/internal/push/provider/mock_provider.go
    • Line 10: warning: exported type Mock should have comment or be unexported (golint)
    • Line 14: warning: exported function NewMock should have comment or be unexported (golint)
    • Line 20: warning: exported method Mock.GetProviderType should have comment or be unexported (golint)
    • Line 24: warning: exported method Mock.Send should have comment or be unexported (golint)
    • Line 45: warning: exported method Mock.SendMulticast should have comment or be unexported (golint)
    • go-starter/internal/push/provider/fcm_provider.go
    • Line 13: warning: exported type FCM should have comment or be unexported (golint)
    • Line 18: warning: exported type FCMConfig should have comment or be unexported (golint)
    • Line 24: warning: exported function NewFCM should have comment or be unexported (golint)
    • Line 37: warning: exported method FCM.GetProviderType should have comment or be unexported (golint)
    • Line 41: warning: exported method FCM.Send should have comment or be unexported (golint)
    • Line 70: warning: exported method FCM.SendMulticast should have comment or be unexported (golint)
    • go-starter/internal/api/middleware/auth.go
    • Line 23: warning: exported var ErrBadRequestMalformedToken should have comment or be unexported (golint)
    • Line 63: warning: exported type AuthFailureMode should have comment or be unexported (golint)
    • Line 94: warning: exported type AuthTokenSource should have comment or be unexported (golint)
    • Line 118: warning: exported method AuthTokenSource.Extract should have comment or be unexported (golint)
    • Line 152: warning: exported type AuthTokenFormatValidator should have comment or be unexported (golint)
    • Line 154: warning: exported function DefaultAuthTokenFormatValidator should have comment or be unexported (golint)
    • Line 158: warning: exported type AuthTokenValidator should have comment or be unexported (golint)
    • Line 160: warning: exported function DefaultAuthTokenValidator should have comment or be unexported (golint)
    • Line 183: warning: exported var DefaultAuthConfig should have comment or be unexported (golint)
    • Line 196: warning: exported type AuthConfig should have comment or be unexported (golint)
    • Line 209: warning: exported method AuthConfig.CheckLastAuthenticatedAt should have comment or be unexported (golint)
    • Line 221: warning: exported method AuthConfig.CheckUserScopes should have comment or be unexported (golint)
    • Line 241: warning: exported function Auth should have comment or be unexported (golint)
    • Line 247: warning: exported function AuthWithConfig should have comment or be unexported (golint)
    • go-starter/internal/api/middleware/logger.go
    • Line 107: warning: exported var DefaultLoggerConfig should have comment or be unexported (golint)
    • Line 124: warning: exported type LoggerConfig should have comment or be unexported (golint)
    • Line 141: warning: exported function Logger should have comment or be unexported (golint)
    • Line 145: warning: exported function LoggerWithConfig should have comment or be unexported (golint)
    • go-starter/internal/mailer/mailer.go
    • Line 19: warning: exported var ErrEmailTemplateNotFound should have comment or be unexported (golint)
    • Line 23: warning: exported type Mailer should have comment or be unexported (golint)
    • Line 29: warning: exported function New should have comment or be unexported (golint)
    • Line 37: warning: exported method Mailer.ParseTemplates should have comment or be unexported (golint)
    • Line 61: warning: exported method Mailer.SendPasswordReset should have comment or be unexported (golint)
    • go-starter/internal/api/httperrors/error.go
    • Line 20: warning: exported type HTTPError should have comment or be unexported (golint)
    • Line 26: warning: exported type HTTPValidationError should have comment or be unexported (golint)
    • Line 32: warning: exported function NewHTTPError should have comment or be unexported (golint)
    • Line 42: warning: exported function NewHTTPErrorWithDetail should have comment or be unexported (golint)
    • Line 83: warning: exported function NewHTTPValidationError should have comment or be unexported (golint)
    • Line 96: warning: exported function NewHTTPValidationErrorWithDetail should have comment or be unexported (golint)
    • go-starter/internal/data/fixtures.go
    • Line 13: warning: exported type Upsertable should have comment or be unexported (golint)
    • Line 17: warning: exported type FixtureMap should have comment or be unexported (golint)
    • Line 19: warning: exported function Fixtures should have comment or be unexported (golint)
    • Line 23: warning: exported function Upserts should have comment or be unexported (golint)
    • go-starter/internal/util/currency.go
    • Line 5: warning: exported function Int64PtrWithCentsToFloat64Ptr should have comment or be unexported (golint)
    • Line 13: warning: exported function Int64WithCentsToFloat64Ptr should have comment or be unexported (golint)
    • Line 17: warning: exported function IntPtrWithCentsToFloat64Ptr should have comment or be unexported (golint)
    • Line 25: warning: exported function IntWithCentsToFloat64Ptr should have comment or be unexported (golint)
    • Line 29: warning: exported function Float64PtrToInt64PtrWithCents should have comment or be unexported (golint)
    • Line 37: warning: exported function Float64PtrToInt64WithCents should have comment or be unexported (golint)
    • Line 41: warning: exported function Float64PtrToIntPtrWithCents should have comment or be unexported (golint)
    • Line 49: warning: exported function Float64PtrToIntWithCents 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!