Preparing report...

Report for github.com/PasteUs/PasteMeGoBackend

A    Great!    Found 16 issues across 21 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!


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!


golint23%

Golint is a linter for Go source code.

    • PasteMeGoBackend/router/router_test.go
    • Line 28: 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 44: 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)
    • PasteMeGoBackend/handler/common/errors.go
    • Line 9: warning: exported var ErrZeroExpireMinute should have comment or be unexported (golint)
    • Line 31: warning: exported type ErrorResponse should have comment or be unexported (golint)
    • Line 40: warning: exported method ErrorResponse.Abort should have comment or be unexported (golint)
    • Line 44: warning: exported function New should have comment or be unexported (golint)
    • PasteMeGoBackend/model/dao/dao.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 10: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 30: warning: exported var DB should have comment or be unexported (golint)
    • Line 58: warning: exported function CreateTable should have comment or be unexported (golint)
    • PasteMeGoBackend/model/paste/paste.go
    • Line 11: warning: exported type IPaste should have comment or be unexported (golint)
    • Line 20: warning: exported type AbstractPaste should have comment or be unexported (golint)
    • Line 31: warning: exported method AbstractPaste.GetKey should have comment or be unexported (golint)
    • Line 35: warning: exported method AbstractPaste.GetContent should have comment or be unexported (golint)
    • Line 39: warning: exported method AbstractPaste.GetLang should have comment or be unexported (golint)
    • Line 57: warning: exported function Exist should have comment or be unexported (golint)
    • PasteMeGoBackend/handler/common/common.go
    • Line 8: warning: exported type IResponse should have comment or be unexported (golint)
    • Line 12: warning: exported type Response should have comment or be unexported (golint)
    • Line 16: warning: exported method Response.GetHttpStatusCode should have comment or be unexported (golint)
    • Line 23: warning: exported function JSON should have comment or be unexported (golint)
    • Line 27: warning: exported function NotFoundHandler should have comment or be unexported (golint)
    • PasteMeGoBackend/handler/paste/util.go
    • Line 15: warning: exported type CreateRequest should have comment or be unexported (golint)
    • Line 22: warning: exported type CreateResponse should have comment or be unexported (golint)
    • Line 27: warning: exported type GetResponse should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

An error occurred while running this test (signal: killed)


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!