Preparing report...

Report for github.com/hnlq715/doggy

A+    Excellent!    Found 12 issues across 20 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!


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!


golint40%

Golint is a linter for Go source code.

    • doggy/middleware/traceid.go
    • Line 42: warning: exported type TraceID should have comment or be unexported (golint)
    • Line 60: warning: exported function GetReqID should have comment or be unexported (golint)
    • doggy/utils/log.go
    • Line 16: warning: exported function LogFromContext should have comment or be unexported (golint)
    • Line 34: warning: exported function ContextWithLog should have comment or be unexported (golint)
    • Line 35: warning: should not use basic type string as key in context.WithValue (golint)
    • doggy/middleware/ratelimit.go
    • Line 17: warning: exported type RateLimit should have comment or be unexported (golint)
    • Line 30: warning: comment on exported method RateLimit.ServerHTTP should be of the form "ServerHTTP ..." (golint)
    • doggy/httpclient/http.go
    • Line 20: warning: exported type Request should have comment or be unexported (golint)
    • Line 49: warning: exported function Get should have comment or be unexported (golint)
    • Line 53: warning: exported function Post should have comment or be unexported (golint)
    • Line 57: warning: exported method Request.Bytes should have comment or be unexported (golint)
    • Line 92: warning: exported method Request.ToJSON should have comment or be unexported (golint)
    • Line 101: warning: exported method Request.ToXML should have comment or be unexported (golint)
    • doggy/httpclient/http_test.go
    • Line 16: warning: don't use underscores in Go names; struct field Accept_Encoding should be AcceptEncoding (golint)
    • Line 17: warning: don't use underscores in Go names; struct field Accept_Language should be AcceptLanguage (golint)
    • Line 20: warning: don't use underscores in Go names; struct field Upgrade_Insecure_Requests should be UpgradeInsecureRequests (golint)
    • Line 21: warning: don't use underscores in Go names; struct field User_Agent should be UserAgent (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!


misspell95%

Misspell Finds commonly misspelled English words