Preparing report...

Report for github.com/phachon/wmqx

A+    Excellent!    Found 21 issues across 29 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!


gocyclo96%

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.


golint31%

Golint is a linter for Go source code.

    • wmqx/message/record_file.go
    • Line 10: warning: don't use underscores in Go names; const QMessage_Record_Type should be QMessageRecordType (golint)
    • Line 10: warning: exported const QMessage_Record_Type should have comment or be unexported (golint)
    • Line 12: warning: exported type RecordFile should have comment or be unexported (golint)
    • Line 16: warning: exported type RecordFileConfig should have comment or be unexported (golint)
    • Line 21: warning: exported function NewRecordFile should have comment or be unexported (golint)
    • Line 25: warning: comment on exported method RecordFile.Init should be of the form "Init ..." (golint)
    • Line 70: warning: comment on exported method RecordFile.Clean should be of the form "Clean ..." (golint)
    • wmqx/container/worker.go
    • Line 10: warning: exported var Worker should have comment or be unexported (golint)
    • Line 12: warning: don't use underscores in Go names; const Consumer_Action_Insert should be ConsumerActionInsert (golint)
    • Line 12: warning: exported const Consumer_Action_Insert should have comment or be unexported (golint)
    • Line 13: warning: don't use underscores in Go names; const Consumer_Action_Update should be ConsumerActionUpdate (golint)
    • Line 13: warning: exported const Consumer_Action_Update should have comment or be unexported (golint)
    • Line 14: warning: don't use underscores in Go names; const Consumer_Action_Delete should be ConsumerActionDelete (golint)
    • Line 14: warning: exported const Consumer_Action_Delete should have comment or be unexported (golint)
    • Line 15: warning: don't use underscores in Go names; const Consumer_Action_Status should be ConsumerActionStatus (golint)
    • Line 15: warning: exported const Consumer_Action_Status should have comment or be unexported (golint)
    • Line 17: warning: exported function NewWorker should have comment or be unexported (golint)
    • Line 27: warning: exported type ConsumerWorker should have comment or be unexported (golint)
    • wmqx/app/controllers/consumer.go
    • Line 12: warning: exported type ConsumerController should have comment or be unexported (golint)
    • Line 16: warning: comment on exported function NewConsumerController should be of the form "NewConsumerController ..." (golint)
    • Line 21: warning: comment on exported method ConsumerController.Add should be of the form "Add ..." (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 80: warning: comment on exported method ConsumerController.Update should be of the form "Update ..." (golint)
    • Line 81: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 147: warning: comment on exported method ConsumerController.Delete should be of the form "Delete ..." (golint)
    • Line 148: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 185: warning: comment on exported method ConsumerController.Status should be of the form "Status ..." (golint)
    • Line 186: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 240: warning: comment on exported method ConsumerController.GetConsumerById should be of the form "GetConsumerById ..." (golint)
    • Line 241: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • wmqx/app/controllers/publish.go
    • Line 12: warning: exported type PublishController should have comment or be unexported (golint)
    • Line 16: warning: comment on exported function NewPublishController should be of the form "NewPublishController ..." (golint)
    • Line 21: warning: comment on exported method PublishController.Publish should be of the form "Publish ..." (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • wmqx/app/service/mq.go
    • Line 8: warning: exported var MQ should have comment or be unexported (golint)
    • Line 10: warning: exported function NewMQ should have comment or be unexported (golint)
    • Line 14: warning: exported type MqService should have comment or be unexported (golint)
    • Line 17: warning: comment on exported method MqService.ReloadExchanges should be of the form "ReloadExchanges ..." (golint)
    • Line 52: warning: comment on exported method MqService.ReloadExchange should be of the form "ReloadExchange ..." (golint)
    • Line 91: warning: comment on exported method MqService.DeclareExchange should be of the form "DeclareExchange ..." (golint)
    • Line 108: warning: comment on exported method MqService.DeleteExchange should be of the form "DeleteExchange ..." (golint)
    • Line 139: warning: comment on exported method MqService.DeclareConsumer should be of the form "DeclareConsumer ..." (golint)
    • Line 164: warning: comment on exported method MqService.UnbindStopConsumer should be of the form "UnbindStopConsumer ..." (golint)
    • Line 194: warning: exported method MqService.CountConsumerMessages should have comment or be unexported (golint)
    • Line 214: warning: comment on exported method MqService.StopAllConsumer should be of the form "StopAllConsumer ..." (golint)
    • Line 233: warning: comment on exported method MqService.Publish should be of the form "Publish ..." (golint)
    • wmqx/router.go
    • Line 8: warning: exported type Router should have comment or be unexported (golint)
    • Line 11: warning: comment on exported function NewRouter should be of the form "NewRouter ..." (golint)
    • Line 16: warning: comment on exported method Router.Api should be of the form "Api ..." (golint)
    • Line 54: warning: comment on exported method Router.Publish should be of the form "Publish ..." (golint)
    • wmqx/pools/rabbitmq.go
    • Line 14: warning: exported type RabbitMQ should have comment or be unexported (golint)
    • Line 18: warning: exported function NewRabbitMQPools should have comment or be unexported (golint)
    • Line 22: warning: comment on exported method RabbitMQ.Init should be of the form "Init ..." (golint)
    • Line 30: warning: comment on exported method RabbitMQ.GetMQ should be of the form "GetMQ ..." (golint)
    • Line 40: warning: comment on exported method RabbitMQ.Recover should be of the form "Recover ..." (golint)
    • Line 46: warning: comment on exported type RabbitMQFactory should be of the form "RabbitMQFactory ..." (with optional leading article) (golint)
    • Line 50: warning: comment on exported method RabbitMQFactory.MakeObject should be of the form "MakeObject ..." (golint)
    • Line 79: warning: comment on exported method RabbitMQFactory.DestroyObject should be of the form "DestroyObject ..." (golint)
    • Line 86: warning: comment on exported method RabbitMQFactory.ValidateObject should be of the form "ValidateObject ..." (golint)
    • Line 102: warning: comment on exported method RabbitMQFactory.ActivateObject should be of the form "ActivateObject ..." (golint)
    • Line 108: warning: comment on exported method RabbitMQFactory.PassivateObject should be of the form "PassivateObject ..." (golint)
    • wmqx/message/publish_message.go
    • Line 8: warning: exported function NewPublishMessage should have comment or be unexported (golint)
    • Line 12: warning: exported type PublishMessage should have comment or be unexported (golint)
    • Line 20: warning: comment on exported method PublishMessage.Encode should be of the form "Encode ..." (golint)
    • Line 29: warning: comment on exported method PublishMessage.Decode should be of the form "Decode ..." (golint)
    • Line 41: warning: comment on exported method PublishMessage.EncodeOriginalString should be of the form "EncodeOriginalString ..." (golint)
    • Line 53: warning: comment on exported method PublishMessage.OriginalString should be of the form "OriginalString ..." (golint)
    • wmqx/mq/rabbitmq.go
    • Line 9: warning: exported type RabbitMQ should have comment or be unexported (golint)
    • Line 15: warning: comment on exported function NewRabbitMQ should be of the form "NewRabbitMQ ..." (golint)
    • Line 27: warning: comment on exported method RabbitMQ.GetConnect should be of the form "GetConnect ..." (golint)
    • Line 32: warning: comment on exported method RabbitMQ.GetChannel should be of the form "GetChannel ..." (golint)
    • Line 38: warning: comment on exported method RabbitMQ.DeclareExchange should be of the form "DeclareExchange ..." (golint)
    • Line 72: warning: comment on exported method RabbitMQ.DeleteExchange should be of the form "DeleteExchange ..." (golint)
    • Line 93: warning: comment on exported method RabbitMQ.DeclareQueue should be of the form "DeclareQueue ..." (golint)
    • Line 126: warning: comment on exported method RabbitMQ.DeleteQueue should be of the form "DeleteQueue ..." (golint)
    • Line 149: warning: comment on exported method RabbitMQ.BindQueueToExchange should be of the form "BindQueueToExchange ..." (golint)
    • Line 168: warning: comment on exported method RabbitMQ.UnBindQueueToExchange should be of the form "UnBindQueueToExchange ..." (golint)
    • Line 186: warning: comment on exported method RabbitMQ.Publish should be of the form "Publish ..." (golint)
    • Line 209: warning: comment on exported method RabbitMQ.DeclareConsumer should be of the form "DeclareConsumer ..." (golint)
    • Line 225: warning: comment on exported method RabbitMQ.Consume should be of the form "Consume ..." (golint)
    • Line 245: warning: comment on exported method RabbitMQ.GetExchangeName should be of the form "GetExchangeName ..." (golint)
    • Line 251: warning: comment on exported method RabbitMQ.Close should be of the form "Close ..." (golint)
    • wmqx/utils/tail.go
    • Line 12: warning: exported var Tail should have comment or be unexported (golint)
    • Line 16: warning: exported function NewTail should have comment or be unexported (golint)
    • wmqx/app/controllers/log.go
    • Line 16: warning: exported type LogController should have comment or be unexported (golint)
    • Line 20: warning: comment on exported function NewLogController should be of the form "NewLogController ..." (golint)
    • Line 25: warning: comment on exported method LogController.Search should be of the form "Search ..." (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 105: warning: comment on exported method LogController.List should be of the form "List ..." (golint)
    • Line 106: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 137: warning: comment on exported method LogController.Download should be of the form "Download ..." (golint)
    • Line 138: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • wmqx/app/controllers/message.go
    • Line 11: warning: exported type MessageController should have comment or be unexported (golint)
    • Line 15: warning: comment on exported function NewMessageController should be of the form "NewMessageController ..." (golint)
    • Line 20: warning: comment on exported method MessageController.Add should be of the form "Add ..." (golint)
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 75: warning: comment on exported method MessageController.Update should be of the form "Update ..." (golint)
    • Line 76: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 131: warning: comment on exported method MessageController.Delete should be of the form "Delete ..." (golint)
    • Line 132: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 169: warning: comment on exported method MessageController.Status should be of the form "Status ..." (golint)
    • Line 170: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 219: warning: comment on exported method MessageController.List should be of the form "List ..." (golint)
    • Line 220: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 231: warning: comment on exported method MessageController.GetMessageByName should be of the form "GetMessageByName ..." (golint)
    • Line 232: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 252: warning: comment on exported method MessageController.GetConsumersByName should be of the form "GetConsumersByName ..." (golint)
    • Line 253: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 269: warning: comment on exported method MessageController.Reload should be of the form "Reload ..." (golint)
    • Line 270: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • wmqx/utils/file.go
    • Line 10: warning: exported var File should have comment or be unexported (golint)
    • Line 12: warning: exported function NewFile should have comment or be unexported (golint)
    • wmqx/message/consumer_process.go
    • Line 10: warning: exported function NewConsumerProcess should have comment or be unexported (golint)
    • Line 14: warning: comment on exported type ConsumerProcess should be of the form "ConsumerProcess ..." (with optional leading article) (golint)
    • Line 20: warning: comment on exported type ConsumerProcessMessage should be of the form "ConsumerProcessMessage ..." (with optional leading article) (golint)
    • Line 28: warning: don't use underscores in Go names; const Consumer_Sign_Stop should be ConsumerSignStop (golint)
    • Line 28: warning: exported const Consumer_Sign_Stop should have comment or be unexported (golint)
    • Line 30: warning: comment on exported method ConsumerProcess.ProcessIsExist should be of the form "ProcessIsExist ..." (golint)
    • Line 42: warning: comment on exported method ConsumerProcess.GetProcessMessage should be of the form "GetProcessMessage ..." (golint)
    • Line 57: warning: comment on exported method ConsumerProcess.AddProcess should be of the form "AddProcess ..." (golint)
    • Line 78: warning: comment on exported method ConsumerProcess.UpdateProcessByKey should be of the form "UpdateProcessByKey ..." (golint)
    • Line 97: warning: comment on exported method ConsumerProcess.DeleteProcessByKey should be of the form "DeleteProcessByKey ..." (golint)
    • Line 112: warning: comment on exported method ConsumerProcess.StopProcessByKey should be of the form "StopProcessByKey ..." (golint)
    • wmqx/message/qmessage.go
    • Line 8: warning: exported type Message should have comment or be unexported (golint)
    • Line 18: warning: exported type Consumer should have comment or be unexported (golint)
    • Line 28: warning: exported type QMessageRecordFunc should have comment or be unexported (golint)
    • Line 30: warning: exported type QMessage should have comment or be unexported (golint)
    • Line 36: warning: exported type QMessageRecord should have comment or be unexported (golint)
    • Line 57: warning: comment on exported function NewQMessage should be of the form "NewQMessage ..." (golint)
    • Line 82: warning: comment on exported method QMessage.IsExistsMessage should be of the form "IsExistsMessage ..." (golint)
    • Line 95: warning: comment on exported method QMessage.AddMessage should be of the form "AddMessage ..." (golint)
    • Line 109: warning: comment on exported method QMessage.UpdateMessageByName should be of the form "UpdateMessageByName ..." (golint)
    • Line 131: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 136: warning: comment on exported method QMessage.DeleteMessageByName should be of the form "DeleteMessageByName ..." (golint)
    • Line 151: warning: comment on exported method QMessage.GetMessageByName should be of the form "GetMessageByName ..." (golint)
    • Line 161: warning: comment on exported method QMessage.GetMessages should be of the form "GetMessages ..." (golint)
    • Line 166: warning: comment on exported method QMessage.ClearMessages should be of the form "ClearMessages ..." (golint)
    • Line 175: warning: comment on exported method QMessage.IsExistsMessageAndConsumerId should be of the form "IsExistsMessageAndConsumerId ..." (golint)
    • Line 194: warning: comment on exported method QMessage.AddConsumer should be of the form "AddConsumer ..." (golint)
    • Line 213: warning: comment on exported method QMessage.GetConsumersByMessageName should be of the form "GetConsumersByMessageName ..." (golint)
    • Line 223: warning: comment on exported method QMessage.GetConsumerById should be of the form "GetConsumerById ..." (golint)
    • Line 237: warning: comment on exported method QMessage.UpdateConsumerByName should be of the form "UpdateConsumerByName ..." (golint)
    • Line 261: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 266: warning: comment on exported method QMessage.DeleteConsumerByNameAndId should be of the form "DeleteConsumerByNameAndId ..." (golint)
    • Line 285: warning: comment on exported method QMessage.UpdateRecord should be of the form "UpdateRecord ..." (golint)
    • Line 294: warning: comment on exported method QMessage.LoadRecord should be of the form "LoadRecord ..." (golint)
    • wmqx/app/controllers/base.go
    • Line 10: warning: exported type BaseController should have comment or be unexported (golint)
    • Line 13: warning: exported type JsonResult should have comment or be unexported (golint)
    • Line 19: warning: comment on exported method BaseController.GetCtxString should be of the form "GetCtxString ..." (golint)
    • Line 24: warning: comment on exported method BaseController.GetCtxBool should be of the form "GetCtxBool ..." (golint)
    • Line 33: warning: comment on exported method BaseController.GetCtxInt should be of the form "GetCtxInt ..." (golint)
    • Line 40: warning: comment on exported method BaseController.GetCtxFloat64 should be of the form "GetCtxFloat64 ..." (golint)
    • Line 47: warning: comment on exported method BaseController.AccessToken should be of the form "AccessToken ..." (golint)
    • wmqx/message/record_config.go
    • Line 3: warning: exported type RecordConfig should have comment or be unexported (golint)
    • Line 7: warning: exported function NewRecordConfigFile should have comment or be unexported (golint)
    • wmqx/container/context.go
    • Line 15: warning: exported var Ctx should have comment or be unexported (golint)
    • Line 17: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 25: warning: exported type Context should have comment or be unexported (golint)
    • Line 37: warning: comment on exported method Context.SetRabbitMQPools should be of the form "SetRabbitMQPools ..." (golint)
    • Line 43: warning: comment on exported method Context.GetConsumerKey should be of the form "GetConsumerKey ..." (golint)
    • Line 48: warning: comment on exported method Context.SplitConsumerKey should be of the form "SplitConsumerKey ..." (golint)
    • Line 53: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 58: warning: comment on exported method Context.InitExchanges should be of the form "InitExchanges ..." (golint)
    • Line 94: warning: comment on exported method Context.RequestConsumerUrl should be of the form "RequestConsumerUrl ..." (golint)
    • wmqx/app/controllers/system.go
    • Line 11: warning: exported type SystemController should have comment or be unexported (golint)
    • Line 15: warning: comment on exported function NewSystemController should be of the form "NewSystemController ..." (golint)
    • Line 20: warning: exported method SystemController.Index should have comment or be unexported (golint)
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: comment on exported method SystemController.Reload should be of the form "Reload ..." (golint)
    • Line 34: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words