moleculer-go/moleculer

View on GitHub
transit/pubsub/pubsub.go

Summary

Maintainability
C
1 day
Test Coverage

PubSub has 42 methods (exceeds 20 allowed). Consider refactoring.
Open

type PubSub struct {
    logger               *log.Entry
    transport            transit.Transport
    broker               *moleculer.BrokerDelegates
    isConnected          bool
Severity: Minor
Found in transit/pubsub/pubsub.go - About 5 hrs to fix

    File pubsub.go has 646 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    package pubsub
    
    import (
        "errors"
        "fmt"
    Severity: Minor
    Found in transit/pubsub/pubsub.go - About 5 hrs to fix

      Avoid deeply nested control flow statements.
      Open

          } else if isKafka(pubsub.broker.Config.Transporter) {
              pubsub.logger.Info("Transporter: KafkaTransporter")
              transport = pubsub.createKafkaTransporter()
          } else {
              pubsub.logger.Info("Transporter: Memory")
      Severity: Major
      Found in transit/pubsub/pubsub.go - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status