[VOL-3285] Resolving statis code analysis warnings

Change-Id: Iaddaae92c649fd27ce0a63f1786af594667c9e8e
diff --git a/internal/common/kafka_utils.go b/internal/common/kafka_utils.go
index 780093a..c999539 100644
--- a/internal/common/kafka_utils.go
+++ b/internal/common/kafka_utils.go
@@ -39,10 +39,6 @@
 	Timestamp string
 }
 
-type saramaIf interface {
-	NewAsyncProducer(addrs []string, conf *sarama.Config) (sarama.AsyncProducer, error)
-}
-
 // InitializePublisher initalizes kafka publisher
 func InitializePublisher(NewAsyncProducer func([]string, *sarama.Config) (sarama.AsyncProducer, error), oltID int) error {
 
@@ -68,35 +64,34 @@
 func KafkaPublisher(eventChannel chan Event) {
 	defer log.Debugf("KafkaPublisher stopped")
 	for {
-		select {
-		case event := <-eventChannel:
-			log.WithFields(log.Fields{
-				"EventType": event.EventType,
-				"OnuSerial": event.OnuSerial,
-				"OltID":     event.OltID,
-				"IntfID":    event.IntfID,
-				"OnuID":     event.OnuID,
-				"EpochTime": event.EpochTime,
-				"Timestamp": event.Timestamp,
-			}).Trace("Received event on channel")
-			jsonEvent, err := json.Marshal(event)
-			if err != nil {
-				log.Errorf("Failed to get json event %v", err)
-				continue
-			}
-			producer.Input() <- &sarama.ProducerMessage{
-				Topic: topic,
-				Value: sarama.ByteEncoder(jsonEvent),
-			}
-			log.WithFields(log.Fields{
-				"EventType": event.EventType,
-				"OnuSerial": event.OnuSerial,
-				"OltID":     event.OltID,
-				"IntfID":    event.IntfID,
-				"OnuID":     event.OnuID,
-				"EpochTime": event.EpochTime,
-				"Timestamp": event.Timestamp,
-			}).Debug("Event sent on kafka")
+		event := <-eventChannel
+		log.WithFields(log.Fields{
+			"EventType": event.EventType,
+			"OnuSerial": event.OnuSerial,
+			"OltID":     event.OltID,
+			"IntfID":    event.IntfID,
+			"OnuID":     event.OnuID,
+			"EpochTime": event.EpochTime,
+			"Timestamp": event.Timestamp,
+		}).Trace("Received event on channel")
+		jsonEvent, err := json.Marshal(event)
+		if err != nil {
+			log.Errorf("Failed to get json event %v", err)
+			continue
 		}
+		producer.Input() <- &sarama.ProducerMessage{
+			Topic: topic,
+			Value: sarama.ByteEncoder(jsonEvent),
+		}
+		log.WithFields(log.Fields{
+			"EventType": event.EventType,
+			"OnuSerial": event.OnuSerial,
+			"OltID":     event.OltID,
+			"IntfID":    event.IntfID,
+			"OnuID":     event.OnuID,
+			"EpochTime": event.EpochTime,
+			"Timestamp": event.Timestamp,
+		}).Debug("Event sent on kafka")
 	}
+
 }
diff --git a/internal/common/options.go b/internal/common/options.go
index 6c728fb..5dd1553 100644
--- a/internal/common/options.go
+++ b/internal/common/options.go
@@ -17,7 +17,6 @@
 package common
 
 import (
-	"errors"
 	"flag"
 	"fmt"
 	"io/ioutil"
@@ -49,7 +48,7 @@
 	log.WithFields(log.Fields{
 		"ValidValues": strings.Join(tagAllocationValues[1:], ", "),
 	}).Errorf("%s-is-not-a-valid-tag-allocation", s)
-	return TagAllocation(0), errors.New(fmt.Sprintf("%s-is-not-a-valid-tag-allocation", s))
+	return TagAllocation(0), fmt.Errorf("%s-is-not-a-valid-tag-allocation", s)
 }
 
 const (
@@ -80,7 +79,7 @@
 	log.WithFields(log.Fields{
 		"ValidValues": strings.Join(sadisFormatValues[1:], ", "),
 	}).Errorf("%s-is-not-a-valid-sadis-format", s)
-	return SadisFormat(0), errors.New(fmt.Sprintf("%s-is-not-a-valid-sadis-format", s))
+	return SadisFormat(0), fmt.Errorf("%s-is-not-a-valid-sadis-format", s)
 }
 
 const (
@@ -117,7 +116,7 @@
 	Technology         string `yaml:"technology"`
 	ID                 int    `yaml:"id"`
 	OltRebootDelay     int    `yaml:"reboot_delay"`
-	PortStatsInterval  int    `yaml: "port_stats_interval"`
+	PortStatsInterval  int    `yaml:"port_stats_interval"`
 }
 
 type BBSimConfig struct {
@@ -146,7 +145,7 @@
 	Events               bool          `yaml:"enable_events"`
 	ControlledActivation string        `yaml:"controlled_activation"`
 	EnablePerf           bool          `yaml:"enable_perf"`
-	KafkaEventTopic      string        `yaml:"kafka_event_topic`
+	KafkaEventTopic      string        `yaml:"kafka_event_topic"`
 }
 
 type BBRConfig struct {