func CreateChannel(connection *amqp.Connection) (*amqp.Channel, error) {
	channel, err := connection.Channel()
	if err != nil {
		return nil, err
	}
	return channel, nil
}
CreateChannel create a channel
from the given connection
package messageBus
import (
	"fmt"
	"os"
	"github.com/streadway/amqp"
)
const (
	host     = "localhost"
	port     = 5672
	user     = "guest"
	password = "guest"
)
func Connect() (*amqp.Connection, error) {
	var url string
	if os.Getenv("RABBITMQ_HOST") != "" {
		url = fmt.Sprintf("amqp://%s:%s@%s", user, password, os.Getenv("RABBITMQ_HOST"))
	} else {
		url = fmt.Sprintf("amqp://%s:%s@%s:%d", user, password, host, port)
	}
	connection, err := amqp.Dial(url)
	if err != nil {
		return nil, err
	}
	return connection, nil
}