Preparing report...

Report for github.com/weplanx/go

(v0.0.0-20220131082845-4e99e3d4d5ae)

A+    Excellent!    Found 9 issues across 15 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


golint40%

Golint is a linter for Go source code.

    • route/route.go
    • Line 9: warning: exported type Option should have comment or be unexported (golint)
    • Line 13: warning: exported type OptionFunc should have comment or be unexported (golint)
    • Line 15: warning: exported function SetModel should have comment or be unexported (golint)
    • Line 21: warning: exported function Use should have comment or be unexported (golint)
    • engine/common.go
    • Line 15: warning: exported const ModelNameKey should have comment or be unexported (golint)
    • Line 17: warning: exported type Engine should have comment or be unexported (golint)
    • Line 23: warning: exported type Option should have comment or be unexported (golint)
    • Line 27: warning: exported type OptionFunc should have comment or be unexported (golint)
    • Line 29: warning: exported function SetApp should have comment or be unexported (golint)
    • Line 35: warning: exported function UseStaticOptions should have comment or be unexported (golint)
    • Line 41: warning: exported function UseEvents should have comment or be unexported (golint)
    • Line 47: warning: exported function New should have comment or be unexported (golint)
    • Line 55: warning: exported type EventValue should have comment or be unexported (golint)
    • Line 62: warning: exported method Engine.Publish should have comment or be unexported (golint)
    • Line 79: warning: exported type Pagination should have comment or be unexported (golint)
    • Line 84: warning: exported function RegisterValidation should have comment or be unexported (golint)
    • Line 100: warning: exported var Provides should have comment or be unexported (golint)
    • engine/controller.go
    • Line 9: warning: exported type Controller should have comment or be unexported (golint)
    • Line 14: warning: exported type CommonParams should have comment or be unexported (golint)
    • Line 19: warning: exported method Controller.Params should have comment or be unexported (golint)
    • Line 29: warning: exported type CreateBody should have comment or be unexported (golint)
    • Line 70: warning: exported type FindQuery should have comment or be unexported (golint)
    • Line 134: warning: exported type UpdateQuery should have comment or be unexported (golint)
    • Line 140: warning: exported type UpdateBody should have comment or be unexported (golint)
    • Line 192: warning: exported method Controller.UpdateOneById should have comment or be unexported (golint)
    • Line 217: warning: exported type ReplaceOneBody should have comment or be unexported (golint)
    • Line 223: warning: exported method Controller.ReplaceOneById should have comment or be unexported (golint)
    • Line 247: warning: exported method Controller.DeleteOneById should have comment or be unexported (golint)
    • password/password.go
    • Line 9: warning: exported var Params should have comment or be unexported (golint)
    • Line 10: warning: error var NotMatch should have name of the form ErrFoo (golint)
    • Line 13: warning: exported function Create should have comment or be unexported (golint)
    • Line 17: warning: exported function Verify should have comment or be unexported (golint)
    • passport/passport.go
    • Line 9: warning: exported type Passport should have comment or be unexported (golint)
    • Line 18: warning: exported type Option should have comment or be unexported (golint)
    • encryption/idx.go
    • Line 5: warning: exported type IDx should have comment or be unexported (golint)
    • Line 10: warning: exported function NewIDx should have comment or be unexported (golint)
    • engine/service.go
    • Line 15: warning: exported type Service should have comment or be unexported (golint)
    • Line 59: warning: exported method Service.InsertOne should have comment or be unexported (golint)
    • Line 77: warning: exported method Service.InsertMany should have comment or be unexported (golint)
    • Line 99: warning: exported method Service.Find should have comment or be unexported (golint)
    • Line 139: warning: exported method Service.FindById should have comment or be unexported (golint)
    • Line 152: warning: exported type FindResult should have comment or be unexported (golint)
    • Line 157: warning: exported method Service.FindByPage should have comment or be unexported (golint)
    • Line 182: warning: exported method Service.FindOne should have comment or be unexported (golint)
    • Line 199: warning: exported method Service.FindOneById should have comment or be unexported (golint)
    • Line 208: warning: exported method Service.UpdateMany should have comment or be unexported (golint)
    • Line 225: warning: exported method Service.UpdateManyById should have comment or be unexported (golint)
    • Line 240: warning: exported method Service.UpdateOne should have comment or be unexported (golint)
    • Line 258: warning: exported method Service.UpdateOneById should have comment or be unexported (golint)
    • Line 270: warning: exported method Service.ReplaceOneById should have comment or be unexported (golint)
    • Line 291: warning: exported method Service.DeleteOneById should have comment or be unexported (golint)
    • encryption/cipher.go
    • Line 10: warning: exported type Cipher should have comment or be unexported (golint)
    • Line 14: warning: exported function NewCipher 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!