Preparing report...

Report for github.com/donutloop/easy-middleware

A    Great!    Found 30 issues across 30 files

Tweet

gofmt83%

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!


golint6%

Golint is a linter for Go source code.

    • easy-middleware/json.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 10: warning: comment on exported function Json should be of the form "Json ..." (golint)
    • Line 20: warning: comment on exported type JsonResponseWriter should be of the form "JsonResponseWriter ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported method JsonResponseWriter.EncodeJson should be of the form "EncodeJson ..." (golint)
    • Line 39: warning: exported method JsonResponseWriter.WriteError should have comment or be unexported (golint)
    • Line 52: warning: exported method JsonResponseWriter.Header should have comment or be unexported (golint)
    • Line 56: warning: comment on exported method JsonResponseWriter.WriteJson should be of the form "WriteJson ..." (golint)
    • Line 71: warning: comment on exported method JsonResponseWriter.WriteHeader should be of the form "WriteHeader ..." (golint)
    • Line 76: warning: comment on exported method JsonResponseWriter.Flush should be of the form "Flush ..." (golint)
    • Line 83: warning: comment on exported method JsonResponseWriter.CloseNotify should be of the form "CloseNotify ..." (golint)
    • Line 90: warning: comment on exported method JsonResponseWriter.Hijack should be of the form "Hijack ..." (golint)
    • easy-middleware/delay.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported const DELAY_HEADER_KEY should have comment or be unexported (golint)
    • Line 11: warning: comment on exported function Delay should be of the form "Delay ..." (golint)
    • easy-middleware/helper.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 10: warning: exported function NewError should have comment or be unexported (golint)
    • Line 19: warning: exported type ErrorResponse should have comment or be unexported (golint)
    • Line 23: warning: exported type ErrorEntity should have comment or be unexported (golint)
    • Line 29: warning: exported function WriteJsonError should have comment or be unexported (golint)
    • easy-middleware/chain.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 7: warning: exported type Middleware should have comment or be unexported (golint)
    • easy-middleware/cors.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 7: warning: comment on exported function Cors should be of the form "Cors ..." (golint)
    • easy-middleware/sql_db.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported const SqlDbContextKey should have comment or be unexported (golint)
    • Line 39: warning: exported var Open should have comment or be unexported (golint)
    • Line 45: warning: exported var Close should have comment or be unexported (golint)
    • easy-middleware/urlquery.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 54: warning: exported type Queries should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method Queries.GetAll should be of the form "GetAll ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.

    • easy-middleware/nocache_test.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/donutloop/easy-middleware (invalid package name: "") (ineffassign)
    • Line 17: warning: undeclared name: easy_middleware (ineffassign)
    • Line 4: warning: "github.com/donutloop/easy-middleware" imported but not used (ineffassign)
    • easy-middleware/urlquery_test.go
    • Line 14: warning: undeclared name: easy_middleware (ineffassign)
    • Line 15: warning: undeclared name: easy_middleware (ineffassign)
    • Line 29: warning: undeclared name: easy_middleware (ineffassign)
    • Line 4: warning: "github.com/donutloop/easy-middleware" imported but not used (ineffassign)

misspell90%

Misspell Finds commonly misspelled English words