Preparing report...

Report for github.com/gol4ng/httpware

A    Great!    Found 34 issues across 62 files

Tweet

gofmt87%

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!


golint51%

Golint is a linter for Go source code.

    • httpware/middleware/auth.go
    • Line 29: warning: exported type CredentialFinder should have comment or be unexported (golint)
    • Line 30: warning: exported type AuthenticateFunc should have comment or be unexported (golint)
    • Line 31: warning: exported type ErrorHandler should have comment or be unexported (golint)
    • Line 36: warning: exported type AuthConfig should have comment or be unexported (golint)
    • Line 47: warning: exported function NewAuthConfig should have comment or be unexported (golint)
    • Line 56: warning: exported function DefaultErrorHandler should have comment or be unexported (golint)
    • Line 95: warning: exported type AuthFuncConfig should have comment or be unexported (golint)
    • Line 105: warning: exported function NewAuthFuncConfig should have comment or be unexported (golint)
    • Line 113: warning: exported function DefaultCredentialFinder should have comment or be unexported (golint)
    • httpware/middleware/response_writer_interceptor.go
    • Line 7: warning: exported type ResponseWriterInterceptor should have comment or be unexported (golint)
    • Line 13: warning: exported method ResponseWriterInterceptor.WriteHeader should have comment or be unexported (golint)
    • Line 23: warning: exported function NewResponseWriterInterceptor should have comment or be unexported (golint)
    • httpware/metrics/prometheus/recorder.go
    • Line 12: warning: exported type Recorder should have comment or be unexported (golint)
    • Line 18: warning: exported method Recorder.RegisterOn should have comment or be unexported (golint)
    • Line 31: warning: exported method Recorder.ObserveHTTPRequestDuration should have comment or be unexported (golint)
    • Line 35: warning: exported method Recorder.ObserveHTTPResponseSize should have comment or be unexported (golint)
    • Line 39: warning: exported method Recorder.AddInflightRequests should have comment or be unexported (golint)
    • Line 43: warning: exported function NewRecorder should have comment or be unexported (golint)
    • httpware/rate_limit/errors.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 4: warning: exported const RequestLimitReachedErr should have comment (or a comment on this block) or be unexported (golint)
    • httpware/rate_limit/token_bucket.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 10: warning: exported type TokenBucket should have comment or be unexported (golint)
    • Line 18: warning: exported method TokenBucket.Allow should have comment or be unexported (golint)
    • Line 29: warning: exported method TokenBucket.Inc should have comment or be unexported (golint)
    • Line 35: warning: exported method TokenBucket.Dec should have comment or be unexported (golint)
    • Line 37: warning: exported method TokenBucket.Stop should have comment or be unexported (golint)
    • Line 57: warning: exported function NewTokenBucket should have comment or be unexported (golint)
    • httpware/auth/authenticator.go
    • Line 7: warning: exported type Authenticator should have comment or be unexported (golint)
    • Line 11: warning: exported type AuthenticatorFunc should have comment or be unexported (golint)
    • Line 13: warning: exported method AuthenticatorFunc.Authenticate should have comment or be unexported (golint)
    • httpware/correlation_id/config.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 7: warning: exported const HeaderName should have comment or be unexported (golint)
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • httpware/correlation_id/rand.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 15: warning: exported method LockedSource.Int63 should have comment or be unexported (golint)
    • Line 22: warning: exported method LockedSource.Uint64 should have comment or be unexported (golint)
    • Line 29: warning: exported method LockedSource.Seed should have comment or be unexported (golint)
    • Line 35: warning: exported function NewLockedSource should have comment or be unexported (golint)
    • httpware/auth/context.go
    • Line 9: warning: exported function CredentialToContext should have comment or be unexported (golint)
    • Line 13: warning: exported function CredentialFromContext should have comment or be unexported (golint)
    • httpware/middleware.go
    • Line 44: warning: comment on exported type Middlewares should be of the form "Middlewares ..." (with optional leading article) (golint)
    • Line 56: warning: comment on exported method Middlewares.DecorateHandlerFunc should be of the form "DecorateHandlerFunc ..." (golint)
    • httpware/request_listener/curl.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 43: warning: exported function GetCurlCommand should have comment or be unexported (golint)
    • Line 68: warning: exported type Cmd should have comment or be unexported (golint)
    • httpware/middleware/rate_limit.go
    • Line 10: warning: exported function RateLimit should have comment or be unexported (golint)
    • Line 28: warning: exported type RateLimitOption should have comment or be unexported (golint)
    • Line 30: warning: exported type RateLimitErrorCallback should have comment or be unexported (golint)
    • Line 32: warning: exported type RateLimitConfig should have comment or be unexported (golint)
    • Line 43: warning: exported function NewRateLimitConfig should have comment or be unexported (golint)
    • Line 50: warning: exported function DefaultRateLimitErrorCallback should have comment or be unexported (golint)
    • Line 55: warning: exported function WithRateLimitErrorCallback should have comment or be unexported (golint)
    • httpware/correlation_id/generator.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 17: warning: exported type RandomIdGenerator should have comment or be unexported (golint)
    • Line 21: warning: exported method RandomIdGenerator.Generate should have comment or be unexported (golint)
    • Line 38: warning: exported var DefaultIdGenerator should have comment or be unexported (golint)
    • Line 48: warning: exported function NewRandomIdGenerator should have comment or be unexported (golint)
    • httpware/auth/credential.go
    • Line 3: warning: exported type Credential should have comment or be unexported (golint)
    • Line 5: warning: exported type CredentialProvider should have comment or be unexported (golint)
    • Line 7: warning: exported type CredentialSetter should have comment or be unexported (golint)
    • httpware/auth/http.go
    • Line 8: warning: exported const AuthorizationHeader should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported function FromHeader should have comment or be unexported (golint)
    • Line 18: warning: exported function ExtractFromHeader should have comment or be unexported (golint)
    • Line 31: warning: exported function AddHeader should have comment or be unexported (golint)
    • httpware/tripperware/rate_limit.go
    • Line 10: warning: exported function RateLimit should have comment or be unexported (golint)
    • Line 29: warning: exported type RateLimitErrorCallback should have comment or be unexported (golint)
    • Line 31: warning: exported type RateLimitOption should have comment or be unexported (golint)
    • Line 33: warning: exported type RateLimitConfig should have comment or be unexported (golint)
    • Line 44: warning: exported function NewRateLimitConfig should have comment or be unexported (golint)
    • Line 51: warning: exported function DefaultRateLimitErrorCallback should have comment or be unexported (golint)
    • Line 57: warning: exported function WithRateLimitErrorCallback should have comment or be unexported (golint)
    • httpware/tripperware.go
    • Line 75: warning: comment on exported type Tripperwares should be of the form "Tripperwares ..." (with optional leading article) (golint)
    • Line 127: warning: comment on exported method Tripperwares.AppendIf should be of the form "AppendIf ..." (golint)
    • Line 146: warning: comment on exported method Tripperwares.PrependIf should be of the form "PrependIf ..." (golint)
    • httpware/tripperware/auth.go
    • Line 10: warning: exported function AuthenticationForwarder should have comment or be unexported (golint)
    • Line 25: warning: exported type AuthConfig should have comment or be unexported (golint)
    • Line 35: warning: exported function NewAuthConfig should have comment or be unexported (golint)
    • Line 43: warning: exported function DefaultCredentialForwarder 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!