Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Robertson <[email protected]>
  • Loading branch information
IanRobertson-wpe committed Nov 1, 2020
1 parent ee6d2c5 commit 40b9be7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions outputs/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"google.golang.org/api/option"
"log"
"os"
//"time"
"errors"
"encoding/json"
"github.com/DataDog/datadog-go/statsd"
Expand Down Expand Up @@ -43,7 +42,6 @@ func NewGCPClient(config *types.Configuration, stats *types.Statistics, statsdCl
log.Printf("[ERROR] : GCP PubSub - %v\n", "Error while creating GCP PubSub Client")
return nil, errors.New("Error while creating GCP PubSub Client")
}
//defer pubSubClient.Close()
topicClient = pubSubClient.Topic(config.GCP.PubSub.Topic)
}
return &Client{
Expand Down
6 changes: 3 additions & 3 deletions stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ func getInitStats() *types.Statistics {
stats.AzureEventHub.Add("total", 0)
stats.AzureEventHub.Add("error", 0)
stats.AzureEventHub.Add("ok", 0)
stats.GCPPubSub.Add("total", 0)
stats.GCPPubSub.Add("error", 0)
stats.GCPPubSub.Add("ok", 0)
stats.GCPPubSub.Add("total", 0)
stats.GCPPubSub.Add("error", 0)
stats.GCPPubSub.Add("ok", 0)

return stats
}
6 changes: 3 additions & 3 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ type eventHub struct {

type gcpOutputConfig struct {
Credentials string
PubSub gcpPubSub
PubSub gcpPubSub
}

type gcpPubSub struct {
ProjectID string
Topic string
MinimumPriority string
Topic string
MinimumPriority string
}

// Statistics is a struct to store stastics
Expand Down

0 comments on commit 40b9be7

Please sign in to comment.