Preparing report...

Report for github.com/wzshiming/httpcache

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


golint25%

Golint is a linter for Go source code.

    • httpcache/options.go
    • Line 8: warning: exported type Option should have comment or be unexported (golint)
    • Line 33: warning: exported function WithStorer should have comment or be unexported (golint)
    • Line 39: warning: exported function WithKeyer should have comment or be unexported (golint)
    • Line 45: warning: exported function WithFilterer should have comment or be unexported (golint)
    • httpcache/utils.go
    • Line 34: 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)
    • httpcache/directory.go
    • Line 9: warning: exported type Directory should have comment or be unexported (golint)
    • Line 11: warning: exported function DirectoryStorer should have comment or be unexported (golint)
    • Line 15: warning: exported method Directory.Get should have comment or be unexported (golint)
    • Line 26: warning: exported method Directory.Put should have comment or be unexported (golint)
    • Line 36: warning: exported method Directory.Del should have comment or be unexported (golint)
    • httpcache/keyer.go
    • Line 13: warning: exported function JointKeyer should have comment or be unexported (golint)
    • Line 48: warning: exported function BodyKeyer should have comment or be unexported (golint)
    • Line 56: warning: exported function QueryKeyer should have comment or be unexported (golint)
    • Line 80: warning: exported function HeaderKeyer should have comment or be unexported (golint)
    • Line 104: warning: exported function PathKeyer should have comment or be unexported (golint)
    • Line 113: warning: exported function MethodKeyer should have comment or be unexported (golint)
    • httpcache/memory.go
    • Line 9: warning: exported function MemoryStorer should have comment or be unexported (golint)
    • Line 13: warning: exported type Memory should have comment or be unexported (golint)
    • Line 17: warning: exported method Memory.Get should have comment or be unexported (golint)
    • Line 25: warning: exported method Memory.Put should have comment or be unexported (golint)
    • Line 39: warning: exported method Memory.Del should have comment or be unexported (golint)
    • httpcache/round_tripper.go
    • Line 10: warning: exported type RoundTripper should have comment or be unexported (golint)
    • Line 16: warning: exported function NewRoundTripper should have comment or be unexported (golint)
    • Line 27: warning: exported method RoundTripper.RoundTrip should have comment or be unexported (golint)
    • Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • httpcache/cache.go
    • Line 8: warning: exported type Filterer should have comment or be unexported (golint)
    • Line 12: warning: exported type FiltererFunc should have comment or be unexported (golint)
    • Line 14: warning: exported method FiltererFunc.Filter should have comment or be unexported (golint)
    • Line 18: warning: exported type Keyer should have comment or be unexported (golint)
    • Line 22: warning: exported type KeyerFunc should have comment or be unexported (golint)
    • Line 24: warning: exported method KeyerFunc.Key should have comment or be unexported (golint)
    • Line 28: warning: exported type Storer should have comment or be unexported (golint)
    • httpcache/filterer.go
    • Line 8: warning: exported function AndJointFilterer should have comment or be unexported (golint)
    • Line 25: warning: exported function OrJointFilterer should have comment or be unexported (golint)
    • Line 42: warning: exported function MethodFilterer should have comment or be unexported (golint)
    • Line 48: warning: exported function PrefixFilterer should have comment or be unexported (golint)
    • httpcache/handler.go
    • Line 10: warning: exported type Handler should have comment or be unexported (golint)
    • Line 16: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 70: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign91%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!