Skip to content

Commit

Permalink
Merge pull request #42 from HeavyHorst/2123
Browse files Browse the repository at this point in the history
removed unnecessary pointers
  • Loading branch information
matryer authored Aug 15, 2017
2 parents 888b717 + 753a59d commit b43d8ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
7 changes: 2 additions & 5 deletions queues/nats/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ type publisher interface {

// Transport is a vice.Transport for NATS queue.
type Transport struct {
*sync.Mutex
wg *sync.WaitGroup
sync.Mutex
wg sync.WaitGroup

receiveChans map[string]chan []byte
sendChans map[string]chan []byte
Expand Down Expand Up @@ -56,9 +56,6 @@ func New(opts ...Option) *Transport {
}

return &Transport{
Mutex: &sync.Mutex{},
wg: &sync.WaitGroup{},

NatsAddr: DefaultAddr,

receiveChans: make(map[string]chan []byte),
Expand Down
6 changes: 2 additions & 4 deletions queues/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type Transport struct {
sendChans map[string]chan []byte
receiveChans map[string]chan []byte

*sync.Mutex
wg *sync.WaitGroup
sync.Mutex
wg sync.WaitGroup

errChan chan error
stopchan chan struct{}
Expand All @@ -35,8 +35,6 @@ func New(opts ...Option) *Transport {
return &Transport{
sendChans: make(map[string]chan []byte),
receiveChans: make(map[string]chan []byte),
Mutex: &sync.Mutex{},
wg: &sync.WaitGroup{},
errChan: make(chan error, 10),
stopchan: make(chan struct{}),
stopPubChan: make(chan struct{}),
Expand Down
5 changes: 2 additions & 3 deletions queues/sqs/sqs.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (

// Transport is a vice.Transport for Amazon's SQS
type Transport struct {
wg *sync.WaitGroup
wg sync.WaitGroup

sm sync.Mutex
sendChans map[string]chan []byte

Expand All @@ -33,7 +33,6 @@ type Transport struct {
// New returns a new transport
func New() *Transport {
return &Transport{
wg: &sync.WaitGroup{},
sendChans: make(map[string]chan []byte),
receiveChans: make(map[string]chan []byte),
errChan: make(chan error, 10),
Expand Down

0 comments on commit b43d8ef

Please sign in to comment.