Preparing report...

Report for github.com/ddliu/go-httpclient

A    Great!    Found 6 issues across 7 files

Tweet

gofmt85%

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!


golint28%

Golint is a linter for Go source code.

    • go-httpclient/error.go
    • Line 20: warning: comment on exported type Error should be of the form "Error ..." (with optional leading article) (golint)
    • Line 27: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 43: warning: comment on exported function IsTimeoutError should be of the form "IsTimeoutError ..." (golint)
    • Line 62: warning: comment on exported function IsRedirectError should be of the form "IsRedirectError ..." (golint)
    • go-httpclient/httpclient.go
    • Line 4: warning: package comment should be of the form "Package httpclient ..." (golint)
    • Line 42: warning: exported const PROXY_HTTP should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: comment on exported const OPT_AUTOREFERER should be of the form "OPT_AUTOREFERER ..." (golint)
    • Line 62: warning: comment on exported const OPT_REDIRECT_POLICY should be of the form "OPT_REDIRECT_POLICY ..." (golint)
    • Line 73: warning: comment on exported var CONST should be of the form "CONST ..." (golint)
    • Line 126: warning: comment on exported type Response should be of the form "Response ..." (with optional leading article) (golint)
    • Line 131: warning: comment on exported method Response.ReadAll should be of the form "ReadAll ..." (golint)
    • Line 132: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 149: warning: comment on exported method Response.ToString should be of the form "ToString ..." (golint)
    • Line 150: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 160: warning: don't use underscores in Go names; func parameter url_ should be url (golint)
    • Line 197: warning: don't use underscores in Go names; var connectTimeoutMS_ should be connectTimeoutMS (golint)
    • Line 203: warning: don't use underscores in Go names; var connectTimeout_ should be connectTimeout (golint)
    • Line 215: warning: don't use underscores in Go names; var timeoutMS_ should be timeoutMS (golint)
    • Line 221: warning: don't use underscores in Go names; var timeout_ should be timeout (golint)
    • Line 260: warning: don't use underscores in Go names; var proxyFunc_ should be proxyFunc (golint)
    • Line 287: warning: don't use underscores in Go names; var proxytype_ should be proxytype (golint)
    • Line 294: warning: don't use underscores in Go names; var proxy_ should be proxy (golint)
    • Line 311: warning: don't use underscores in Go names; var unsafe_tls_ should be unsafeTLS (golint)
    • Line 312: warning: don't use underscores in Go names; var unsafe_tls should be unsafeTLS (golint)
    • Line 313: warning: don't use underscores in Go names; var tls_config should be tlsConfig (golint)
    • Line 328: warning: don't use underscores in Go names; var redirectPolicy_ should be redirectPolicy (golint)
    • Line 334: warning: don't use underscores in Go names; var followlocation_ should be followlocation (golint)
    • Line 341: warning: don't use underscores in Go names; var maxredirs_ should be maxredirs (golint)
    • Line 381: warning: don't use underscores in Go names; var optCookieJar_ should be optCookieJar (golint)
    • Line 402: warning: comment on exported function NewHttpClient should be of the form "NewHttpClient ..." (golint)
    • Line 413: warning: comment on exported type HttpClient should be of the form "HttpClient ..." (with optional leading article) (golint)
    • Line 450: warning: comment on exported method HttpClient.Defaults should be of the form "Defaults ..." (golint)
    • Line 451: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 477: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 485: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 500: warning: comment on exported method HttpClient.WithOption should be of the form "WithOption ..." (golint)
    • Line 501: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 520: warning: comment on exported method HttpClient.WithOptions should be of the form "WithOptions ..." (golint)
    • Line 521: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 530: warning: comment on exported method HttpClient.WithHeader should be of the form "WithHeader ..." (golint)
    • Line 531: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 540: warning: comment on exported method HttpClient.WithHeaders should be of the form "WithHeaders ..." (golint)
    • Line 541: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 549: warning: comment on exported method HttpClient.WithCookie should be of the form "WithCookie ..." (golint)
    • Line 550: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 556: warning: comment on exported method HttpClient.Do should be of the form "Do ..." (golint)
    • Line 559: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 651: warning: comment on exported method HttpClient.Head should be of the form "Head ..." (golint)
    • Line 652: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 656: warning: comment on exported method HttpClient.Get should be of the form "Get ..." (golint)
    • Line 657: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 665: warning: comment on exported method HttpClient.Delete should be of the form "Delete ..." (golint)
    • Line 666: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 674: warning: comment on exported method HttpClient.Post should be of the form "Post ..." (golint)
    • Line 681: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 701: warning: comment on exported method HttpClient.PostMultipart should be of the form "PostMultipart ..." (golint)
    • Line 702: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 733: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 754: warning: exported method HttpClient.PostJson should have comment or be unexported (golint)
    • Line 754: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 758: warning: comment on exported method HttpClient.Put should be of the form "Put ..." (golint)
    • Line 759: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 763: warning: comment on exported method HttpClient.PutJson should be of the form "PutJson ..." (golint)
    • Line 764: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 768: warning: comment on exported method HttpClient.PatchJson should be of the form "PatchJson ..." (golint)
    • Line 769: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 773: warning: comment on exported method HttpClient.Options should be of the form "Options ..." (golint)
    • Line 774: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 782: warning: comment on exported method HttpClient.Connect should be of the form "Connect ..." (golint)
    • Line 783: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 791: warning: comment on exported method HttpClient.Trace should be of the form "Trace ..." (golint)
    • Line 792: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 800: warning: comment on exported method HttpClient.Patch should be of the form "Patch ..." (golint)
    • Line 801: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 809: warning: comment on exported method HttpClient.Cookies should be of the form "Cookies ..." (golint)
    • Line 810: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 810: warning: don't use underscores in Go names; method parameter url_ should be url (golint)
    • Line 819: warning: comment on exported method HttpClient.CookieValues should be of the form "CookieValues ..." (golint)
    • Line 820: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 820: warning: don't use underscores in Go names; method parameter url_ should be url (golint)
    • Line 830: warning: comment on exported method HttpClient.CookieValue should be of the form "CookieValue ..." (golint)
    • Line 831: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 831: warning: don't use underscores in Go names; method parameter url_ should be url (golint)
    • go-httpclient/util.go
    • Line 17: warning: don't use underscores in Go names; func parameter url_ should be url (golint)
    • Line 23: warning: don't use underscores in Go names; var url_ should be url (golint)
    • Line 27: warning: don't use underscores in Go names; var url_ should be url (golint)
    • Line 29: warning: don't use underscores in Go names; var url_ should be url (golint)
    • Line 52: warning: comment on exported function Option should be of the form "Option ..." (golint)
    • Line 93: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • go-httpclient/default_client.go
    • Line 4: warning: package comment should be of the form "Package httpclient ..." (golint)
    • Line 16: warning: exported var Defaults should have comment or be unexported (golint)
    • Line 17: warning: exported var Begin should have comment or be unexported (golint)
    • Line 18: warning: exported var Do should have comment or be unexported (golint)
    • Line 19: warning: exported var Get should have comment or be unexported (golint)
    • Line 20: warning: exported var Delete should have comment or be unexported (golint)
    • Line 21: warning: exported var Head should have comment or be unexported (golint)
    • Line 22: warning: exported var Post should have comment or be unexported (golint)
    • Line 23: warning: exported var PostJson should have comment or be unexported (golint)
    • Line 24: warning: exported var PostMultipart should have comment or be unexported (golint)
    • Line 25: warning: exported var Put should have comment or be unexported (golint)
    • Line 26: warning: exported var PutJson should have comment or be unexported (golint)
    • Line 27: warning: exported var PatchJson should have comment or be unexported (golint)
    • Line 28: warning: exported var Options should have comment or be unexported (golint)
    • Line 29: warning: exported var Connect should have comment or be unexported (golint)
    • Line 30: warning: exported var Trace should have comment or be unexported (golint)
    • Line 31: warning: exported var Patch should have comment or be unexported (golint)
    • Line 32: warning: exported var WithOption should have comment or be unexported (golint)
    • Line 33: warning: exported var WithOptions should have comment or be unexported (golint)
    • Line 34: warning: exported var WithHeader should have comment or be unexported (golint)
    • Line 35: warning: exported var WithHeaders should have comment or be unexported (golint)
    • Line 36: warning: exported var WithCookie should have comment or be unexported (golint)
    • Line 37: warning: exported var Cookies should have comment or be unexported (golint)
    • Line 38: warning: exported var CookieValues should have comment or be unexported (golint)
    • Line 39: warning: exported var CookieValue should have comment or be unexported (golint)

gocyclo71%

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.

    • go-httpclient/httpclient.go
    • Line 192: warning: cyclomatic complexity 32 of function prepareTransport() is high (> 15) (gocyclo)
    • Line 559: warning: cyclomatic complexity 20 of function (*HttpClient).Do() is high (> 15) (gocyclo)
    • go-httpclient/httpclient_test.go
    • Line 424: warning: cyclomatic complexity 22 of function _TestRedirect() is high (> 15) (gocyclo)
    • Line 525: warning: cyclomatic complexity 19 of function TestCookie() is high (> 15) (gocyclo)
    • Line 30: warning: cyclomatic complexity 16 of function TestRequest() is high (> 15) (gocyclo)

ineffassign85%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell85%

Misspell Finds commonly misspelled English words