Preparing report...

Report for github.com/ZYallers/rpcx-framework

(v0.0.0-20211231060816-b772a1357752)

A    Great!    Found 24 issues across 26 files

Tweet

gofmt84%

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!


golint7%

Golint is a linter for Go source code.

    • service/rpcx.go
    • Line 14: warning: exported type Discovery should have comment or be unexported (golint)
    • Line 20: warning: exported type RPCXService should have comment or be unexported (golint)
    • Line 36: warning: exported method RPCXService.Serve should have comment or be unexported (golint)
    • util/mtsc/model.go
    • Line 9: warning: exported type Model should have comment or be unexported (golint)
    • Line 15: warning: exported method Model.Find should have comment or be unexported (golint)
    • Line 35: warning: exported method Model.FindOne should have comment or be unexported (golint)
    • Line 39: warning: exported method Model.Save should have comment or be unexported (golint)
    • Line 46: warning: exported method Model.Update should have comment or be unexported (golint)
    • Line 50: warning: exported method Model.Delete should have comment or be unexported (golint)
    • Line 57: warning: exported method Model.Count should have comment or be unexported (golint)
    • util/mtsc/redis.go
    • Line 14: warning: exported type Redis should have comment or be unexported (golint)
    • Line 21: warning: comment on exported method Redis.NoDataExpiration should be of the form "NoDataExpiration ..." (golint)
    • Line 28: warning: comment on exported method Redis.CacheWithString should be of the form "CacheWithString ..." (golint)
    • Line 54: warning: comment on exported method Redis.DeleteCache should be of the form "DeleteCache ..." (golint)
    • Line 64: warning: comment on exported method Redis.HashGetAll should be of the form "HashGetAll ..." (golint)
    • Line 82: warning: comment on exported method Redis.HashMultiSet should be of the form "HashMultiSet ..." (golint)
    • Line 117: warning: comment on exported method Redis.HashMultiDelete should be of the form "HashMultiDelete ..." (golint)
    • define/redis.go
    • Line 5: warning: exported type Redis should have comment or be unexported (golint)
    • Line 10: warning: exported type TTLType should have comment or be unexported (golint)
    • Line 14: warning: exported type RedisKey should have comment or be unexported (golint)
    • env/mode.go
    • Line 4: warning: exported const DevelopMode should have comment (or a comment on this block) or be unexported (golint)
    • service/register.go
    • Line 13: warning: exported function RegisterFuncName should have comment or be unexported (golint)
    • Line 51: 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)
    • helper/array.go
    • Line 3: warning: comment on exported function RemoveDuplicateWithInt should be of the form "RemoveDuplicateWithInt ..." (golint)
    • Line 21: warning: comment on exported function RemoveDuplicateWithString should be of the form "RemoveDuplicateWithString ..." (golint)
    • Line 39: warning: comment on exported function RemoveWithString should be of the form "RemoveWithString ..." (golint)
    • Line 54: warning: comment on exported function RemoveWithInt should be of the form "RemoveWithInt ..." (golint)
    • helper/string_byte.go
    • Line 8: warning: comment on exported function String2Bytes should be of the form "String2Bytes ..." (golint)
    • Line 22: warning: comment on exported function Bytes2String should be of the form "Bytes2String ..." (golint)
    • define/rest.go
    • Line 3: warning: exported type Restful should have comment or be unexported (golint)
    • Line 4: warning: exported type RestHandler should have comment or be unexported (golint)
    • env/time.go
    • Line 4: warning: exported const TimeFormat should have comment (or a comment on this block) or be unexported (golint)
    • plugin/base_plugin.go
    • Line 10: warning: exported type BasePlugin should have comment or be unexported (golint)
    • Line 12: warning: exported method BasePlugin.Register should have comment or be unexported (golint)
    • Line 17: warning: exported method BasePlugin.Unregister should have comment or be unexported (golint)
    • Line 22: warning: exported method BasePlugin.RegisterFunction should have comment or be unexported (golint)
    • Line 28: warning: exported method BasePlugin.HandleConnAccept should have comment or be unexported (golint)
    • Line 34: warning: exported method BasePlugin.HandleConnClose should have comment or be unexported (golint)
    • Line 40: warning: exported method BasePlugin.PreReadRequest should have comment or be unexported (golint)
    • Line 45: warning: exported method BasePlugin.PostReadRequest should have comment or be unexported (golint)
    • Line 50: warning: exported method BasePlugin.PreHandleRequest should have comment or be unexported (golint)
    • Line 55: warning: exported method BasePlugin.PreCall should have comment or be unexported (golint)
    • Line 60: warning: exported method BasePlugin.PostCall should have comment or be unexported (golint)
    • Line 65: warning: exported method BasePlugin.PreWriteResponse should have comment or be unexported (golint)
    • Line 70: warning: exported method BasePlugin.PostWriteResponse should have comment or be unexported (golint)
    • Line 75: warning: exported method BasePlugin.PreWriteRequest should have comment or be unexported (golint)
    • Line 80: warning: exported method BasePlugin.PostWriteRequest should have comment or be unexported (golint)
    • Line 85: warning: exported method BasePlugin.HeartbeatRequest should have comment or be unexported (golint)
    • service/restful.go
    • Line 17: warning: exported function GetServices should have comment or be unexported (golint)
    • Line 71: warning: exported function Register should have comment or be unexported (golint)
    • helper/message.go
    • Line 79: warning: exported function ContextMessage should have comment or be unexported (golint)
    • Line 111: warning: exported function SimpleMessage should have comment or be unexported (golint)
    • service.go
    • Line 21: warning: exported function LoadConfig should have comment or be unexported (golint)
    • Line 45: warning: exported function ReadConfig should have comment or be unexported (golint)
    • Line 49: warning: exported function ServiceName should have comment or be unexported (golint)
    • Line 56: warning: exported function ServiceMode should have comment or be unexported (golint)
    • Line 71: warning: exported function ServiceHostName should have comment or be unexported (golint)
    • Line 82: warning: exported function DiscoveryBasePath should have comment or be unexported (golint)
    • Line 98: warning: exported function DiscoveryAddress should have comment or be unexported (golint)
    • Line 115: warning: exported function DiscoveryUpdateInterval should have comment or be unexported (golint)
    • Line 127: warning: exported function NewService should have comment or be unexported (golint)
    • util/mtsc/service.go
    • Line 28: warning: exported type Service should have comment or be unexported (golint)
    • Line 36: warning: context.Context should be the first parameter of a function (golint)
    • Line 36: warning: exported method Service.Construct should have comment or be unexported (golint)
    • Line 56: warning: comment on exported method Service.GetArgs should be of the form "GetArgs ..." (golint)
    • Line 72: warning: comment on exported method Service.GetString should be of the form "GetString ..." (golint)
    • Line 97: warning: comment on exported method Service.GetInt should be of the form "GetInt ..." (golint)
    • Line 126: warning: comment on exported method Service.GetInt64 should be of the form "GetInt64 ..." (golint)
    • Line 156: warning: comment on exported method Service.Finish should be of the form "Finish ..." (golint)
    • Line 173: warning: comment on exported method Service.Record should be of the form "Record ..." (golint)
    • Line 183: warning: comment on exported method Service.Json should be of the form "Json ..." (golint)
    • Line 226: warning: comment on exported method Service.SignCheck should be of the form "SignCheck ..." (golint)
    • Line 258: warning: comment on exported method Service.LoggedUserData should be of the form "LoggedUserData ..." (golint)
    • Line 277: 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 282: warning: comment on exported method Service.LoginCheck should be of the form "LoginCheck ..." (golint)
    • Line 294: warning: comment on exported method Service.LoggedUserId should be of the form "LoggedUserId ..." (golint)
    • helper/time.go
    • Line 8: warning: comment on exported function TodayRemainSecond should be of the form "TodayRemainSecond ..." (golint)
    • Line 17: warning: comment on exported function NowTime should be of the form "NowTime ..." (golint)
    • define/service.go
    • Line 8: warning: exported type M should have comment or be unexported (golint)
    • Line 10: warning: exported type IService should have comment or be unexported (golint)
    • Line 16: warning: exported type ReplyService should have comment or be unexported (golint)
    • Line 26: warning: exported type Record should have comment or be unexported (golint)
    • Line 33: warning: exported type Reply should have comment or be unexported (golint)
    • env/sign.go
    • Line 4: warning: exported const SignTimeExpiration should have comment (or a comment on this block) or be unexported (golint)
    • util/zap/logger.go
    • Line 43: warning: exported function SetLoggerDir should have comment or be unexported (golint)
    • Line 47: warning: exported function Use should have comment or be unexported (golint)
    • env/error.go
    • Line 6: warning: exported var ErrVersionCompare 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!