You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: main_test.go
    path of file: ./repos/go-cloud/samples/gocdk-pubsub
    
    the code of the file until where you have to start completion: // Copyright 2019 The Go C
    
func initRabbit() error {
	conn, err := amqp.Dial(rabbitURL)
	if err != nil {
		return err
	}
	defer conn.Close()
	ch, err := conn.Channel()
	if err != nil {
		return err
	}
	defer ch.Close()
	if err := ch.Confirm(false); err != nil {
		return err
	}
	err = ch.ExchangeDeclare(topicName,
		"fanout", // kind
		false,    // durable
		false,    // delete when unused
		false,    // internal
		false,    // wait for server response
		nil)      // args
	if err != nil {
		return err
	}
	q, err := ch.QueueDeclare(subscriptionName,
		false, // durable
		false, // delete when unused
		false, // exclusive
		false, // wait for server response
		nil)   // args
	if err != nil {
		return err
	}
	return ch.QueueBind(q.Name, q.Name, topicName, false, nil)
}