Skip to content

Commit

Permalink
Added copyright notice in new file
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof Gzocha committed Apr 3, 2019
1 parent 7866e74 commit 2192f2c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions amqpiface/interfaces.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) 2012, Sean Treadway, SoundCloud Ltd.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Source code and contact info at http://github.com/streadway/amqp

package amqpiface

import (
Expand Down
6 changes: 3 additions & 3 deletions integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func TestIntegrationChannelClosing(t *testing.T) {
// This function is run on every channel after it is successfully
// opened. It can do something to verify something. It should be
// quick; many channels may be opened!
f := func(t *testing.T, c ChannelInterface) {
f := func(t *testing.T, c *Channel) {
return
}

Expand Down Expand Up @@ -497,7 +497,7 @@ func TestIntegrationChannelClosing(t *testing.T) {

// multiple channels
for _, n := range []int{2, 4, 8, 16, 32, 64, 128, 256} {
channels := make([]ChannelInterface, n)
channels := make([]*Channel, n)
for i := 0; i < n; i++ {
var err error
if channels[i], err = c.Channel(); err != nil {
Expand Down Expand Up @@ -1807,7 +1807,7 @@ func integrationConnection(t *testing.T, name string) *Connection {
}

// Returns a connection, channel and declares a queue when the AMQP_URL is in the environment
func integrationQueue(t *testing.T, name string) (*Connection, ChannelInterface) {
func integrationQueue(t *testing.T, name string) (*Connection, *Channel) {
if conn := integrationConnection(t, name); conn != nil {
if channel, err := conn.Channel(); err == nil {
if _, err = channel.QueueDeclare(name, false, true, false, false, nil); err == nil {
Expand Down
4 changes: 2 additions & 2 deletions reconnect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// Every connection should declare the topology they expect
func setup(url, queue string) (amqp.ConnectionInterface, amqp.ChannelInterface, error) {
func setup(url, queue string) (*amqp.Connection, *amqp.Channel, error) {
conn, err := amqp.Dial(url)
if err != nil {
return nil, nil, err
Expand All @@ -26,7 +26,7 @@ func setup(url, queue string) (amqp.ConnectionInterface, amqp.ChannelInterface,
return conn, ch, nil
}

func consume(url, queue string) (amqp.ConnectionInterface, <-chan amqp.Delivery, error) {
func consume(url, queue string) (*amqp.Connection, <-chan amqp.Delivery, error) {
conn, ch, err := setup(url, queue)
if err != nil {
return nil, nil, err
Expand Down

0 comments on commit 2192f2c

Please sign in to comment.