Preparing report...

Report for github.com/zc310/utils

A    Great!    Found 13 issues across 24 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!


gocyclo95%

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.


golint50%

Golint is a linter for Go source code.

    • utils/fasthttputil/fresh.go
    • Line 93: warning: exported type CacheControl should have comment or be unexported (golint)
    • Line 95: warning: exported function ParseCacheControl should have comment or be unexported (golint)
    • Line 113: warning: comment on exported function ResponseDate should be of the form "ResponseDate ..." (golint)
    • Line 123: warning: exported function GetResponseAge should have comment or be unexported (golint)
    • Line 136: 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 146: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • utils/encoding.go
    • Line 19: warning: exported function Base64Enc should have comment or be unexported (golint)
    • Line 22: warning: exported function Base64Dec should have comment or be unexported (golint)
    • Line 26: warning: exported function HexEnc should have comment or be unexported (golint)
    • Line 29: warning: exported function HexDec should have comment or be unexported (golint)
    • Line 33: warning: exported function URLEnc should have comment or be unexported (golint)
    • Line 36: warning: exported function URLDec should have comment or be unexported (golint)
    • Line 40: warning: exported function Base64ZlibEnc should have comment or be unexported (golint)
    • Line 47: warning: exported function Base64ZlibDec should have comment or be unexported (golint)
    • Line 62: warning: exported function Base64FlateDec should have comment or be unexported (golint)
    • Line 74: warning: exported function HTMLDec should have comment or be unexported (golint)
    • Line 77: warning: exported function HTMLEnc should have comment or be unexported (golint)
    • Line 81: warning: exported function Base64TwoZlibEnc should have comment or be unexported (golint)
    • Line 92: warning: exported function Base64TwoZlibDec should have comment or be unexported (golint)
    • Line 114: warning: exported function UTF16EncStr should have comment or be unexported (golint)
    • Line 121: warning: exported function UTF16DecStr should have comment or be unexported (golint)
    • Line 129: warning: exported function GB2312EncStr should have comment or be unexported (golint)
    • Line 136: warning: exported function GB2312DecStr should have comment or be unexported (golint)
    • Line 143: warning: exported function GB18030EncStr should have comment or be unexported (golint)
    • Line 150: warning: exported function GB18030DecStr should have comment or be unexported (golint)
    • Line 159: warning: exported function GBKEncStr should have comment or be unexported (golint)
    • Line 166: warning: exported function GBKDecStr should have comment or be unexported (golint)
    • Line 175: warning: exported function GbkEnc should have comment or be unexported (golint)
    • Line 178: warning: exported function GbkDec should have comment or be unexported (golint)
    • Line 181: warning: exported function GB18030Dec should have comment or be unexported (golint)
    • Line 185: warning: exported function ToGBKStr should have comment or be unexported (golint)
    • Line 189: warning: exported function GB18030Enc should have comment or be unexported (golint)
    • Line 192: warning: exported function ToGB18030Str should have comment or be unexported (golint)
    • utils/time.go
    • Line 8: warning: comment on exported function ParseTime should be of the form "ParseTime ..." (golint)
    • utils/httputil/http.go
    • Line 5: warning: exported const UserAgent should have comment or be unexported (golint)
    • Line 11: warning: exported type UserAgentTransport should have comment or be unexported (golint)
    • Line 15: warning: exported method UserAgentTransport.RoundTrip should have comment or be unexported (golint)
    • utils/httputil/request.go
    • Line 14: warning: exported var DefaultClient should have comment or be unexported (golint)
    • Line 16: warning: exported function GetRequest should have comment or be unexported (golint)
    • Line 23: warning: exported function GetJSON should have comment or be unexported (golint)
    • Line 34: warning: exported function GetByte should have comment or be unexported (golint)
    • Line 51: warning: exported function GetString should have comment or be unexported (golint)
    • Line 56: warning: exported function StatusCode should have comment or be unexported (golint)
    • Line 67: warning: exported function GetJs should have comment or be unexported (golint)
    • utils/fasthttputil/proxy.go
    • Line 14: warning: exported var XForwardedFor should have comment or be unexported (golint)
    • Line 19: warning: exported type Target should have comment or be unexported (golint)
    • Line 26: warning: exported type Proxy should have comment or be unexported (golint)
    • Line 37: warning: exported function NewProxyClient should have comment or be unexported (golint)
    • Line 60: warning: exported method Proxy.Handler should have comment or be unexported (golint)
    • Line 67: warning: exported method Proxy.Do should have comment or be unexported (golint)
    • Line 82: warning: exported method Proxy.Down should have comment or be unexported (golint)
    • Line 85: warning: exported method Proxy.Available should have comment or be unexported (golint)
    • Line 88: warning: exported method Proxy.StatusOK should have comment or be unexported (golint)
    • Line 92: warning: exported method Proxy.HealthCheck should have comment or be unexported (golint)
    • utils/json.go
    • Line 7: warning: exported function PrintJSON should have comment or be unexported (golint)
    • Line 15: warning: exported function PrintJSONIndent should have comment or be unexported (golint)
    • utils/math.go
    • Line 24: warning: exported function StrToFloat should have comment or be unexported (golint)
    • Line 58: warning: exported function MinInt64 should have comment or be unexported (golint)
    • Line 65: warning: exported function MaxInt64 should have comment or be unexported (golint)
    • Line 72: warning: exported function MinInt should have comment or be unexported (golint)
    • Line 79: warning: exported function MaxInt should have comment or be unexported (golint)
    • utils/str.go
    • Line 24: warning: exported function CommaTextToDynInt should have comment or be unexported (golint)
    • Line 40: warning: exported type WideString should have comment or be unexported (golint)
    • Line 42: warning: exported method WideString.MarshalJSON should have comment or be unexported (golint)
    • Line 45: warning: exported method WideString.MarshalText 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!