Preparing report...

Report for github.com/PacktPublishing/Go-Building-Web-Applications

A    Great!    Found 87 issues across 151 files

Tweet

gofmt57%

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!


gocyclo98%

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.


golint72%

Golint is a linter for Go source code.

    • Go-Building-Web-Applications/Module 1/Chapter 4/ch4-template-index.go
    • Line 14: warning: exported const DBHost should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported type Page should have comment or be unexported (golint)
    • Line 31: warning: exported method Page.TruncatedText should have comment or be unexported (golint)
    • Line 33: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 42: warning: exported function RedirIndex should have comment or be unexported (golint)
    • Line 46: warning: exported function ServeIndex should have comment or be unexported (golint)
    • Line 62: warning: exported function ServePage should have comment or be unexported (golint)
    • Go-Building-Web-Applications/Module 2/Chapter 3/chat/avatar.go
    • Line 9: warning: comment on exported var ErrNoAvatarURL should be of the form "ErrNoAvatarURL ..." (golint)
    • Line 23: warning: exported type TryAvatars should have comment or be unexported (golint)
    • Line 25: warning: exported method TryAvatars.GetAvatarURL should have comment or be unexported (golint)
    • Line 34: warning: exported type FileSystemAvatar should have comment or be unexported (golint)
    • Line 36: warning: exported var UseFileSystemAvatar should have comment or be unexported (golint)
    • Line 38: warning: exported method FileSystemAvatar.GetAvatarURL should have comment or be unexported (golint)
    • Line 38: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 52: warning: exported type AuthAvatar should have comment or be unexported (golint)
    • Line 54: warning: exported var UseAuthAvatar should have comment or be unexported (golint)
    • Line 56: warning: exported method AuthAvatar.GetAvatarURL should have comment or be unexported (golint)
    • Line 56: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 64: warning: exported type GravatarAvatar should have comment or be unexported (golint)
    • Line 66: warning: exported var UseGravatar should have comment or be unexported (golint)
    • Line 68: warning: exported method GravatarAvatar.GetAvatarURL should have comment or be unexported (golint)
    • Line 68: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Go-Building-Web-Applications/Module 1/Chapter 6/ch6-register-login.go
    • Line 22: warning: exported const DBHost should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported var UserSession should have comment or be unexported (golint)
    • Line 34: warning: exported type Comment should have comment or be unexported (golint)
    • Line 41: warning: exported type Page should have comment or be unexported (golint)
    • Line 52: warning: exported type User should have comment or be unexported (golint)
    • Line 57: warning: exported type Session should have comment or be unexported (golint)
    • Line 64: warning: exported type JSONResponse should have comment or be unexported (golint)
    • Line 112: warning: exported function ServePage should have comment or be unexported (golint)
    • Line 140: warning: exported function APIPage should have comment or be unexported (golint)
    • Line 162: warning: exported function APICommentPost should have comment or be unexported (golint)
    • Line 194: warning: exported function APICommentPut should have comment or be unexported (golint)
    • Line 226: warning: exported function RegisterPOST should have comment or be unexported (golint)
    • Line 251: warning: exported function LoginPOST should have comment or be unexported (golint)
    • Go-Building-Web-Applications/Module 1/Chapter 6/ch6-tls.go
    • Line 16: warning: exported const DBHost should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported type Page should have comment or be unexported (golint)
    • Line 33: warning: exported function ServePage should have comment or be unexported (golint)
    • Line 51: warning: exported function APIPage should have comment or be unexported (golint)
    • Go-Building-Web-Applications/Module 1/Chapter 4/ch4-template-truncate.go
    • Line 14: warning: exported const DBHost should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported type Page should have comment or be unexported (golint)
    • Line 31: warning: exported method Page.TruncatedText should have comment or be unexported (golint)
    • Line 33: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 42: warning: exported function ServePage should have comment or be unexported (golint)
    • Go-Building-Web-Applications/Module 3/Chapter 7/Ch7_2_startopology.go
    • Line 9: warning: exported type Subscriber should have comment or be unexported (golint)
    • Line 17: warning: exported type Task should have comment or be unexported (golint)
    • Line 21: warning: exported var SubscriberCount should have comment or be unexported (golint)
    • Line 23: warning: exported var Subscribers should have comment or be unexported (golint)
    • Line 25: warning: exported var CurrentSubscriber should have comment or be unexported (golint)
    • Go-Building-Web-Applications/Module 3/Chapter 5/ch5_3_server.go
    • Line 16: warning: exported const INPUT_BUFFER_LENGTH should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type User should have comment or be unexported (golint)
    • Line 27: warning: exported method User.Listen should have comment or be unexported (golint)
    • Line 39: warning: exported type ConnectionManager should have comment or be unexported (golint)
    • Line 45: warning: exported function Initiate should have comment or be unexported (golint)
    • Line 76: warning: exported method ConnectionManager.Listen should have comment or be unexported (golint)
    • Line 143: warning: exported var Users 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!