Preparing report...

Report for github.com/phachon/fasthttpsession

A+    Excellent!    Found 32 issues across 45 files

Tweet

gofmt97%

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!


golint31%

Golint is a linter for Go source code.

    • fasthttpsession/encrypt.go
    • Line 16: warning: exported const BASE64TABLE should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported function NewEncrypt should have comment or be unexported (golint)
    • fasthttpsession/store.go
    • Line 9: warning: exported type SessionStore should have comment or be unexported (golint)
    • Line 19: warning: exported type Store should have comment or be unexported (golint)
    • Line 24: warning: comment on exported method Store.Init should be of the form "Init ..." (golint)
    • Line 31: warning: comment on exported method Store.Get should be of the form "Get ..." (golint)
    • Line 36: warning: comment on exported method Store.GetAll should be of the form "GetAll ..." (golint)
    • Line 41: warning: comment on exported method Store.Set should be of the form "Set ..." (golint)
    • Line 46: warning: comment on exported method Store.Delete should be of the form "Delete ..." (golint)
    • Line 51: warning: comment on exported method Store.Flush should be of the form "Flush ..." (golint)
    • Line 56: warning: comment on exported method Store.GetSessionId should be of the form "GetSessionId ..." (golint)
    • fasthttpsession/memcache/provider.go
    • Line 12: warning: exported const ProviderName should have comment or be unexported (golint)
    • Line 19: warning: exported type Provider should have comment or be unexported (golint)
    • Line 26: warning: comment on exported function NewProvider should be of the form "NewProvider ..." (golint)
    • Line 35: warning: comment on exported method Provider.Init should be of the form "Init ..." (golint)
    • Line 65: warning: comment on exported method Provider.NeedGC should be of the form "NeedGC ..." (golint)
    • Line 70: warning: comment on exported method Provider.GC should be of the form "GC ..." (golint)
    • Line 73: warning: comment on exported method Provider.ReadStore should be of the form "ReadStore ..." (golint)
    • Line 82: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 98: warning: comment on exported method Provider.Regenerate should be of the form "Regenerate ..." (golint)
    • Line 131: warning: comment on exported method Provider.Destroy should be of the form "Destroy ..." (golint)
    • Line 137: warning: comment on exported method Provider.Count should be of the form "Count ..." (golint)
    • fasthttpsession/memcache/store.go
    • Line 11: warning: comment on exported function NewMemCacheStore should be of the form "NewMemCacheStore ..." (golint)
    • Line 18: warning: comment on exported function NewMemCacheStoreData should be of the form "NewMemCacheStoreData ..." (golint)
    • Line 25: warning: exported type Store should have comment or be unexported (golint)
    • Line 29: warning: comment on exported method Store.Save should be of the form "Save ..." (golint)
    • fasthttpsession/mysql/config.go
    • Line 10: warning: exported type Config should have comment or be unexported (golint)
    • Line 58: warning: exported function NewConfigWith should have comment or be unexported (golint)
    • Line 69: warning: exported function NewDefaultConfig should have comment or be unexported (golint)
    • Line 102: warning: exported method Config.Name should have comment or be unexported (golint)
    • fasthttpsession/sqlite3/store.go
    • Line 11: warning: comment on exported function NewSqLite3Store should be of the form "NewSqLite3Store ..." (golint)
    • Line 18: warning: comment on exported function NewSqLite3StoreData should be of the form "NewSqLite3StoreData ..." (golint)
    • Line 25: warning: exported type Store should have comment or be unexported (golint)
    • Line 29: warning: comment on exported method Store.Save should be of the form "Save ..." (golint)
    • fasthttpsession/redis/provider.go
    • Line 12: warning: exported const ProviderName should have comment or be unexported (golint)
    • Line 19: warning: exported type Provider should have comment or be unexported (golint)
    • Line 26: warning: comment on exported function NewProvider should be of the form "NewProvider ..." (golint)
    • Line 35: warning: comment on exported method Provider.Init should be of the form "Init ..." (golint)
    • Line 78: warning: comment on exported method Provider.NeedGC should be of the form "NeedGC ..." (golint)
    • Line 83: warning: comment on exported method Provider.GC should be of the form "GC ..." (golint)
    • Line 86: warning: comment on exported method Provider.ReadStore should be of the form "ReadStore ..." (golint)
    • Line 109: warning: comment on exported method Provider.Regenerate should be of the form "Regenerate ..." (golint)
    • Line 128: warning: comment on exported method Provider.Destroy should be of the form "Destroy ..." (golint)
    • Line 141: warning: comment on exported method Provider.Count should be of the form "Count ..." (golint)
    • fasthttpsession/memory/provider.go
    • Line 12: warning: exported const ProviderName should have comment or be unexported (golint)
    • Line 14: warning: exported type Provider should have comment or be unexported (golint)
    • Line 20: warning: comment on exported function NewProvider should be of the form "NewProvider ..." (golint)
    • Line 29: warning: comment on exported method Provider.Init should be of the form "Init ..." (golint)
    • Line 42: warning: comment on exported method Provider.NeedGC should be of the form "NeedGC ..." (golint)
    • Line 47: warning: comment on exported method Provider.GC should be of the form "GC ..." (golint)
    • Line 58: warning: comment on exported method Provider.ReadStore should be of the form "ReadStore ..." (golint)
    • Line 71: warning: comment on exported method Provider.Regenerate should be of the form "Regenerate ..." (golint)
    • Line 90: warning: comment on exported method Provider.Destroy should be of the form "Destroy ..." (golint)
    • Line 96: warning: comment on exported method Provider.Count should be of the form "Count ..." (golint)
    • fasthttpsession/mysql/store.go
    • Line 11: warning: comment on exported function NewMysqlStore should be of the form "NewMysqlStore ..." (golint)
    • Line 18: warning: comment on exported function NewMysqlStoreData should be of the form "NewMysqlStoreData ..." (golint)
    • Line 25: warning: exported type Store should have comment or be unexported (golint)
    • Line 29: warning: comment on exported method Store.Save should be of the form "Save ..." (golint)
    • fasthttpsession/config.go
    • Line 16: warning: comment on exported function NewDefaultConfig should be of the form "NewDefaultConfig ..." (golint)
    • Line 37: warning: exported type Config should have comment or be unexported (golint)
    • Line 83: warning: comment on exported method Config.SessionIdGenerator should be of the form "SessionIdGenerator ..." (golint)
    • Line 99: warning: comment on exported method Config.Encode should be of the form "Encode ..." (golint)
    • Line 113: warning: comment on exported method Config.Decode should be of the form "Decode ..." (golint)
    • fasthttpsession/cookie.go
    • Line 8: warning: exported function NewCookie should have comment or be unexported (golint)
    • Line 12: warning: exported type Cookie should have comment or be unexported (golint)
    • Line 15: warning: comment on exported method Cookie.Get should be of the form "Get ..." (golint)
    • Line 24: warning: comment on exported method Cookie.Set should be of the form "Set ..." (golint)
    • Line 51: warning: comment on exported method Cookie.Delete should be of the form "Delete ..." (golint)
    • fasthttpsession/memory/store.go
    • Line 12: warning: comment on exported function NewMemoryStore should be of the form "NewMemoryStore ..." (golint)
    • Line 19: warning: comment on exported function NewMemoryStoreData should be of the form "NewMemoryStoreData ..." (golint)
    • Line 26: warning: exported type Store should have comment or be unexported (golint)
    • Line 32: warning: comment on exported method Store.Save should be of the form "Save ..." (golint)
    • fasthttpsession/postgres/store.go
    • Line 11: warning: comment on exported function NewPostgresStore should be of the form "NewPostgresStore ..." (golint)
    • Line 18: warning: comment on exported function NewPostgresStoreData should be of the form "NewPostgresStoreData ..." (golint)
    • Line 25: warning: exported type Store should have comment or be unexported (golint)
    • Line 29: warning: comment on exported method Store.Save should be of the form "Save ..." (golint)
    • fasthttpsession/provider.go
    • Line 3: warning: exported type Provider should have comment or be unexported (golint)
    • Line 13: warning: exported type ProviderConfig should have comment or be unexported (golint)
    • fasthttpsession/redis/store.go
    • Line 10: warning: comment on exported function NewRedisStore should be of the form "NewRedisStore ..." (golint)
    • Line 17: warning: comment on exported function NewRedisStoreData should be of the form "NewRedisStoreData ..." (golint)
    • Line 24: warning: exported type Store should have comment or be unexported (golint)
    • Line 28: warning: comment on exported method Store.Save should be of the form "Save ..." (golint)
    • fasthttpsession/postgres/config.go
    • Line 10: warning: exported type Config should have comment or be unexported (golint)
    • Line 47: warning: exported function NewConfigWith should have comment or be unexported (golint)
    • Line 58: warning: exported function NewDefaultConfig should have comment or be unexported (golint)
    • Line 82: warning: exported method Config.Name should have comment or be unexported (golint)
    • fasthttpsession/mysql/provider.go
    • Line 24: warning: exported const ProviderName should have comment or be unexported (golint)
    • Line 31: warning: exported type Provider should have comment or be unexported (golint)
    • Line 38: warning: comment on exported function NewProvider should be of the form "NewProvider ..." (golint)
    • Line 47: warning: comment on exported method Provider.Init should be of the form "Init ..." (golint)
    • Line 83: warning: comment on exported method Provider.NeedGC should be of the form "NeedGC ..." (golint)
    • Line 88: warning: comment on exported method Provider.GC should be of the form "GC ..." (golint)
    • Line 93: warning: comment on exported method Provider.ReadStore should be of the form "ReadStore ..." (golint)
    • Line 119: warning: comment on exported method Provider.Regenerate should be of the form "Regenerate ..." (golint)
    • Line 149: warning: comment on exported method Provider.Destroy should be of the form "Destroy ..." (golint)
    • Line 155: warning: comment on exported method Provider.Count should be of the form "Count ..." (golint)
    • fasthttpsession/postgres/provider.go
    • Line 24: warning: exported const ProviderName should have comment or be unexported (golint)
    • Line 31: warning: exported type Provider should have comment or be unexported (golint)
    • Line 38: warning: comment on exported function NewProvider should be of the form "NewProvider ..." (golint)
    • Line 47: warning: comment on exported method Provider.Init should be of the form "Init ..." (golint)
    • Line 83: warning: comment on exported method Provider.NeedGC should be of the form "NeedGC ..." (golint)
    • Line 88: warning: comment on exported method Provider.GC should be of the form "GC ..." (golint)
    • Line 93: warning: comment on exported method Provider.ReadStore should be of the form "ReadStore ..." (golint)
    • Line 119: warning: comment on exported method Provider.Regenerate should be of the form "Regenerate ..." (golint)
    • Line 149: warning: comment on exported method Provider.Destroy should be of the form "Destroy ..." (golint)
    • Line 155: warning: comment on exported method Provider.Count should be of the form "Count ..." (golint)
    • fasthttpsession/file/provider.go
    • Line 18: warning: exported const ProviderName should have comment or be unexported (golint)
    • Line 25: warning: exported type Provider should have comment or be unexported (golint)
    • Line 32: warning: comment on exported function NewProvider should be of the form "NewProvider ..." (golint)
    • Line 40: warning: comment on exported method Provider.Init should be of the form "Init ..." (golint)
    • Line 68: warning: comment on exported method Provider.NeedGC should be of the form "NeedGC ..." (golint)
    • Line 73: warning: comment on exported method Provider.GC should be of the form "GC ..." (golint)
    • Line 90: warning: comment on exported method Provider.ReadStore should be of the form "ReadStore ..." (golint)
    • Line 127: warning: comment on exported method Provider.Regenerate should be of the form "Regenerate ..." (golint)
    • Line 175: warning: comment on exported method Provider.Destroy should be of the form "Destroy ..." (golint)
    • Line 189: warning: comment on exported method Provider.Count should be of the form "Count ..." (golint)
    • fasthttpsession/ccmap.go
    • Line 12: warning: comment on exported type CCMap should be of the form "CCMap ..." (with optional leading article) (golint)
    • Line 18: warning: comment on exported type MapSlice should be of the form "MapSlice ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported function NewDefaultCCMap should be of the form "NewDefaultCCMap ..." (golint)
    • Line 29: warning: comment on exported function NewCCMap should be of the form "NewCCMap ..." (golint)
    • Line 53: warning: comment on exported method CCMap.GetSliceMap should be of the form "GetSliceMap ..." (golint)
    • Line 58: warning: comment on exported method CCMap.IsExist should be of the form "IsExist ..." (golint)
    • Line 69: warning: comment on exported method CCMap.Set should be of the form "Set ..." (golint)
    • Line 78: warning: comment on exported method CCMap.Get should be of the form "Get ..." (golint)
    • Line 93: warning: comment on exported method CCMap.Delete should be of the form "Delete ..." (golint)
    • Line 102: warning: comment on exported method CCMap.Update should be of the form "Update ..." (golint)
    • Line 120: warning: comment on exported method CCMap.Replace should be of the form "Replace ..." (golint)
    • Line 131: warning: comment on exported method CCMap.MSet should be of the form "MSet ..." (golint)
    • Line 138: warning: comment on exported method CCMap.MGet should be of the form "MGet ..." (golint)
    • Line 148: warning: comment on exported method CCMap.GetOnce should be of the form "GetOnce ..." (golint)
    • Line 155: warning: comment on exported method CCMap.GetAll should be of the form "GetAll ..." (golint)
    • Line 170: warning: comment on exported method CCMap.Clear should be of the form "Clear ..." (golint)
    • Line 180: warning: comment on exported method CCMap.Keys should be of the form "Keys ..." (golint)
    • Line 186: warning: should omit 2nd value from range; this loop is equivalent to `for key := range ...` (golint)
    • Line 194: warning: comment on exported method CCMap.Count should be of the form "Count ..." (golint)
    • fasthttpsession/sqlite3/config.go
    • Line 5: warning: exported type Config should have comment or be unexported (golint)
    • Line 26: warning: exported function NewConfigWith should have comment or be unexported (golint)
    • Line 36: warning: exported method Config.Name should have comment or be unexported (golint)
    • fasthttpsession/sqlite3/provider.go
    • Line 24: warning: exported const ProviderName should have comment or be unexported (golint)
    • Line 31: warning: exported type Provider should have comment or be unexported (golint)
    • Line 38: warning: comment on exported function NewProvider should be of the form "NewProvider ..." (golint)
    • Line 47: warning: comment on exported method Provider.Init should be of the form "Init ..." (golint)
    • Line 80: warning: comment on exported method Provider.NeedGC should be of the form "NeedGC ..." (golint)
    • Line 85: warning: comment on exported method Provider.GC should be of the form "GC ..." (golint)
    • Line 90: warning: comment on exported method Provider.ReadStore should be of the form "ReadStore ..." (golint)
    • Line 116: warning: comment on exported method Provider.Regenerate should be of the form "Regenerate ..." (golint)
    • Line 146: warning: comment on exported method Provider.Destroy should be of the form "Destroy ..." (golint)
    • Line 152: warning: comment on exported method Provider.Count should be of the form "Count ..." (golint)
    • fasthttpsession/session.go
    • Line 21: warning: comment on exported function Register should be of the form "Register ..." (golint)
    • Line 33: warning: comment on exported function NewSession should be of the form "NewSession ..." (golint)
    • Line 57: warning: comment on exported method Session.SetProvider should be of the form "SetProvider ..." (golint)
    • Line 75: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 94: warning: comment on exported method Session.Start should be of the form "Start ..." (golint)
    • Line 137: warning: comment on exported method Session.GetSessionId should be of the form "GetSessionId ..." (golint)
    • Line 165: warning: comment on exported method Session.Regenerate should be of the form "Regenerate ..." (golint)
    • Line 208: warning: comment on exported method Session.Destroy should be of the form "Destroy ..." (golint)
    • Line 229: warning: exported function Version should have comment or be unexported (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!