Preparing report...

Report for github.com/jianzhiyao/gclient

A    Great!    Found 15 issues across 24 files

Tweet

gofmt91%

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!


golint41%

Golint is a linter for Go source code.

    • gclient/request/request.go
    • Line 18: warning: exported type Request should have comment or be unexported (golint)
    • Line 26: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 33: warning: exported method Request.SetHeader should have comment or be unexported (golint)
    • Line 40: warning: exported method Request.GetUrl should have comment or be unexported (golint)
    • Line 44: warning: exported method Request.GetMethod should have comment or be unexported (golint)
    • Line 48: warning: exported method Request.GetHeaders should have comment or be unexported (golint)
    • Line 52: warning: exported method Request.GetHeader should have comment or be unexported (golint)
    • Line 61: warning: exported method Request.GetBody should have comment or be unexported (golint)
    • Line 65: warning: exported method Request.Json should have comment or be unexported (golint)
    • Line 74: warning: exported method Request.Xml should have comment or be unexported (golint)
    • Line 82: warning: exported method Request.MultiForm should have comment or be unexported (golint)
    • Line 106: warning: exported method Request.Form should have comment or be unexported (golint)
    • Line 121: warning: exported method Request.Body should have comment or be unexported (golint)
    • gclient/client.go
    • Line 12: warning: exported type Sign should have comment or be unexported (golint)
    • Line 15: warning: exported const SignGzip should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type Client should have comment or be unexported (golint)
    • Line 34: warning: exported function New should have comment or be unexported (golint)
    • Line 44: warning: exported method Client.Option should have comment or be unexported (golint)
    • Line 49: warning: exported method Client.Close should have comment or be unexported (golint)
    • Line 53: warning: exported method Client.Options should have comment or be unexported (golint)
    • Line 70: warning: exported method Client.Do should have comment or be unexported (golint)
    • Line 74: warning: exported method Client.DoRequest should have comment or be unexported (golint)
    • gclient/options.go
    • Line 10: warning: exported type Option should have comment or be unexported (golint)
    • Line 11: warning: exported type CheckRedirectHandler should have comment or be unexported (golint)
    • Line 13: warning: exported function OptTimeout should have comment or be unexported (golint)
    • Line 19: warning: exported function OptContext should have comment or be unexported (golint)
    • Line 25: warning: exported function OptHeader should have comment or be unexported (golint)
    • Line 31: warning: exported function OptUserAgent should have comment or be unexported (golint)
    • Line 35: warning: exported function OptHeaders should have comment or be unexported (golint)
    • Line 43: warning: exported function OptEnableGzip should have comment or be unexported (golint)
    • Line 47: warning: exported function OptDisableGzip should have comment or be unexported (golint)
    • Line 51: warning: exported function OptEnableBr should have comment or be unexported (golint)
    • Line 55: warning: exported function OptDisableBr should have comment or be unexported (golint)
    • Line 59: warning: exported function OptCookieJar should have comment or be unexported (golint)
    • Line 65: warning: exported function OptTransport should have comment or be unexported (golint)
    • Line 71: warning: exported function OptCheckRedirectHandler should have comment or be unexported (golint)
    • gclient/options_test.go
    • Line 15: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 139: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gclient/response/response.go
    • Line 17: warning: exported type Response should have comment or be unexported (golint)
    • Line 21: warning: exported function New should have comment or be unexported (golint)
    • Line 29: warning: exported method Response.Status should have comment or be unexported (golint)
    • Line 32: warning: exported method Response.StatusCode should have comment or be unexported (golint)
    • Line 49: warning: exported method Response.JsonUnmarshal should have comment or be unexported (golint)
    • Line 57: warning: exported method Response.XmlUnmarshal should have comment or be unexported (golint)
    • Line 65: warning: exported method Response.YamlUnmarshal should have comment or be unexported (golint)
    • Line 81: warning: exported method Response.Bytes should have comment or be unexported (golint)
    • Line 85: warning: exported method Response.Header should have comment or be unexported (golint)
    • Line 88: warning: exported method Response.Headers should have comment or be unexported (golint)
    • Line 96: warning: exported method Response.Body should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words

    • gclient/consts/header.go
    • Line 10: warning: "protocal" is a misspelling of "protocol" (misspell)
    • Line 11: warning: "protocal" is a misspelling of "protocol" (misspell)
    • Line 12: warning: "protocal" is a misspelling of "protocol" (misspell)