Preparing report...

Report for github.com/forgoer/thinkgo

A    Great!    Found 50 issues across 63 files

Tweet

gofmt88%

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!


golint25%

Golint is a linter for Go source code.

    • thinkgo/session/http.go
    • Line 3: warning: exported type Request should have comment or be unexported (golint)
    • Line 7: warning: exported type Response should have comment or be unexported (golint)
    • thinkgo/log/logger.go
    • Line 13: warning: exported type Handler should have comment or be unexported (golint)
    • Line 18: warning: exported type Logger should have comment or be unexported (golint)
    • Line 162: warning: comment on exported function GetLevelName should be of the form "GetLevelName ..." (golint)
    • Line 167: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • thinkgo/think/response.go
    • Line 23: warning: comment on exported function Html should be of the form "Html ..." (golint)
    • Line 28: warning: exported function Response should have comment or be unexported (golint)
    • thinkgo/context/cookie.go
    • Line 12: warning: exported type CookieConfig should have comment or be unexported (golint)
    • Line 30: warning: exported type Cookie should have comment or be unexported (golint)
    • Line 34: warning: exported method Cookie.Set should have comment or be unexported (golint)
    • Line 97: warning: exported function ParseCookieHandler should have comment or be unexported (golint)
    • thinkgo/context/request.go
    • Line 83: warning: comment on exported method Request.Post should be of the form "Post ..." (golint)
    • Line 188: warning: comment on exported method Request.Exists should be of the form "Exists ..." (golint)
    • Line 201: warning: comment on exported method Request.Has should be of the form "Has ..." (golint)
    • Line 257: warning: comment on exported method Request.SetSession should be of the form "SetSession ..." (golint)
    • thinkgo/think.go
    • Line 21: warning: exported type Think should have comment or be unexported (golint)
    • Line 50: warning: comment on exported method Think.RegisterHandler should be of the form "RegisterHandler ..." (golint)
    • thinkgo/context/file.go
    • Line 10: warning: exported type File should have comment or be unexported (golint)
    • Line 14: warning: exported method File.Move should have comment or be unexported (golint)
    • thinkgo/router/route.go
    • Line 13: warning: exported type Request should have comment or be unexported (golint)
    • Line 18: warning: exported type Route should have comment or be unexported (golint)
    • Line 185: warning: exported method Route.Dump should have comment or be unexported (golint)
    • thinkgo/helper/helper.go
    • Line 11: warning: exported function ThinkGoPath should have comment or be unexported (golint)
    • Line 26: warning: exported function WorkPath should have comment or be unexported (golint)
    • Line 39: warning: exported function AppPath should have comment or be unexported (golint)
    • Line 50: warning: exported function ConfigPath should have comment or be unexported (golint)
    • thinkgo/log/formatter/line_formatter.go
    • Line 5: warning: exported type LineFormatter should have comment or be unexported (golint)
    • Line 8: warning: exported function NewLineFormatter should have comment or be unexported (golint)
    • Line 13: warning: exported method LineFormatter.Format should have comment or be unexported (golint)
    • Line 17: warning: exported method LineFormatter.FormatBatch should have comment or be unexported (golint)
    • thinkgo/session/cookie-handler.go
    • Line 3: warning: exported type CookieHandler should have comment or be unexported (golint)
    • Line 8: warning: exported function NewCookieHandler should have comment or be unexported (golint)
    • Line 12: warning: exported method CookieHandler.SetRequest should have comment or be unexported (golint)
    • Line 16: warning: exported method CookieHandler.SetResponse should have comment or be unexported (golint)
    • thinkgo/session/manager.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 25: warning: exported type Manager should have comment or be unexported (golint)
    • Line 30: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 38: warning: exported method Manager.SessionStart should have comment or be unexported (golint)
    • Line 50: warning: exported method Manager.SessionSave should have comment or be unexported (golint)
    • Line 59: warning: exported function Extend should have comment or be unexported (golint)
    • thinkgo/session/store.go
    • Line 14: warning: exported type Store should have comment or be unexported (golint)
    • Line 21: warning: exported function NewStore should have comment or be unexported (golint)
    • Line 30: warning: exported method Store.GetHandler should have comment or be unexported (golint)
    • Line 34: warning: exported method Store.GetId should have comment or be unexported (golint)
    • Line 38: warning: exported method Store.SetId should have comment or be unexported (golint)
    • Line 46: warning: exported method Store.GetName should have comment or be unexported (golint)
    • Line 50: warning: exported method Store.Start should have comment or be unexported (golint)
    • Line 64: warning: exported method Store.Get should have comment or be unexported (golint)
    • Line 74: warning: exported method Store.Set should have comment or be unexported (golint)
    • Line 78: warning: exported method Store.All should have comment or be unexported (golint)
    • Line 82: warning: exported method Store.Remove should have comment or be unexported (golint)
    • Line 88: warning: exported method Store.Forget should have comment or be unexported (golint)
    • Line 94: warning: exported method Store.Clear should have comment or be unexported (golint)
    • Line 98: warning: exported method Store.Save should have comment or be unexported (golint)
    • thinkgo/view/view.go
    • Line 12: warning: exported type View should have comment or be unexported (golint)
    • Line 16: warning: exported function New should have comment or be unexported (golint)
    • Line 27: warning: exported method View.Render should have comment or be unexported (golint)
    • Line 40: warning: exported function Render should have comment or be unexported (golint)
    • Line 44: warning: exported function ParseGlob should have comment or be unexported (golint)
    • thinkgo/log/handler/file.go
    • Line 13: warning: exported type FileHandler should have comment or be unexported (golint)
    • Line 25: warning: exported function NewFileHandler should have comment or be unexported (golint)
    • thinkgo/cache/memory_store.go
    • Line 24: warning: exported type MemoryStore should have comment or be unexported (golint)
    • Line 31: warning: comment on exported function NewMemoryStore should be of the form "NewMemoryStore ..." (golint)
    • Line 108: warning: comment on exported method MemoryStore.Flush should be of the form "Flush ..." (golint)
    • Line 118: warning: exported method MemoryStore.TTL should have comment or be unexported (golint)
    • Line 149: warning: comment on exported method MemoryStore.DeleteExpired should be of the form "DeleteExpired ..." (golint)
    • thinkgo/filesystem/utils.go
    • Line 14: warning: exported function Exists should have comment or be unexported (golint)
    • Line 25: warning: exported function Get should have comment or be unexported (golint)
    • Line 45: warning: exported function Put should have comment or be unexported (golint)
    • Line 67: warning: exported function ModTime should have comment or be unexported (golint)
    • thinkgo/router/pipeline.go
    • Line 9: warning: exported type Pipeline should have comment or be unexported (golint)
    • Line 15: warning: comment on exported function NewPipeline should be of the form "NewPipeline ..." (golint)
    • Line 29: warning: comment on exported method Pipeline.Through should be of the form "Through ..." (golint)
    • thinkgo/cache/redis_store.go
    • Line 11: warning: exported type RedisStore should have comment or be unexported (golint)
    • Line 16: warning: comment on exported function NewRedisStore should be of the form "NewRedisStore ..." (golint)
    • Line 66: warning: comment on exported method RedisStore.Flush should be of the form "Flush ..." (golint)
    • Line 97: warning: exported method RedisStore.TTL should have comment or be unexported (golint)
    • thinkgo/context/response.go
    • Line 7: warning: exported type Response should have comment or be unexported (golint)
    • Line 18: warning: comment on exported method Response.SetContentType should be of the form "SetContentType ..." (golint)
    • Line 24: warning: comment on exported method Response.SetCharset should be of the form "SetCharset ..." (golint)
    • Line 47: warning: comment on exported method Response.GetCharset should be of the form "GetCharset ..." (golint)
    • Line 57: warning: comment on exported method Response.GetContent should be of the form "GetContent ..." (golint)
    • Line 109: warning: comment on exported function ErrorResponse should be of the form "ErrorResponse ..." (golint)
    • thinkgo/config/config.go
    • Line 5: warning: exported var App should have comment or be unexported (golint)
    • Line 6: warning: exported var Route should have comment or be unexported (golint)
    • Line 7: warning: exported var View should have comment or be unexported (golint)
    • Line 9: warning: comment on exported var Cookie should be of the form "Cookie ..." (golint)
    • Line 11: warning: exported var Session should have comment or be unexported (golint)
    • thinkgo/filesystem/fs.go
    • Line 9: warning: exported type JustFileSystem should have comment or be unexported (golint)
    • Line 14: warning: exported function NewFileFileSystem should have comment or be unexported (golint)
    • Line 22: warning: exported method JustFileSystem.Open should have comment or be unexported (golint)
    • thinkgo/think/session_handler.go
    • Line 9: warning: exported type SessionHandler should have comment or be unexported (golint)
    • Line 14: warning: comment on exported function NewSessionHandler should be of the form "NewSessionHandler ..." (golint)
    • Line 30: warning: exported method SessionHandler.Process should have comment or be unexported (golint)
    • thinkgo/think/type.go
    • Line 9: warning: exported type Req should have comment or be unexported (golint)
    • Line 10: warning: exported type Res should have comment or be unexported (golint)
    • Line 12: warning: exported type Route should have comment or be unexported (golint)
    • thinkgo/config/database.go
    • Line 3: warning: exported type DatabaseConfig should have comment or be unexported (golint)
    • Line 8: warning: exported type Connection should have comment or be unexported (golint)
    • thinkgo/log/record/record.go
    • Line 5: warning: exported type Level should have comment or be unexported (golint)
    • Line 8: warning: comment on exported const DEBUG should be of the form "DEBUG ..." (golint)
    • Line 10: warning: comment on exported const INFO should be of the form "INFO ..." (golint)
    • Line 12: warning: comment on exported const NOTICE should be of the form "NOTICE ..." (golint)
    • Line 14: warning: comment on exported const WARNING should be of the form "WARNING ..." (golint)
    • Line 16: warning: comment on exported const ERROR should be of the form "ERROR ..." (golint)
    • Line 18: warning: comment on exported const CRITICAL should be of the form "CRITICAL ..." (golint)
    • Line 20: warning: comment on exported const ALERT should be of the form "ALERT ..." (golint)
    • Line 22: warning: comment on exported const EMERGENCY should be of the form "EMERGENCY ..." (golint)
    • Line 38: warning: exported type Record should have comment or be unexported (golint)
    • thinkgo/cache/repository.go
    • Line 9: warning: exported type Repository should have comment or be unexported (golint)
    • Line 13: warning: exported function NewRepository should have comment or be unexported (golint)
    • thinkgo/log/handler/console.go
    • Line 31: warning: exported type ConsoleHandler should have comment or be unexported (golint)
    • Line 39: warning: exported function NewConsoleHandler should have comment or be unexported (golint)
    • thinkgo/pipeline.go
    • Line 13: warning: exported type Pipeline should have comment or be unexported (golint)
    • Line 19: warning: comment on exported function NewPipeline should be of the form "NewPipeline ..." (golint)
    • Line 33: warning: comment on exported method Pipeline.Through should be of the form "Through ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!