func newChannel(c *Connection, id uint16) *Channel {
	return &Channel{
		connection: c,
		id:         id,
		rpc:        make(chan message),
		consumers:  makeConsumers(),
		confirms:   newConfirms(),
		recv:       (*Channel).recvMethod,
		errors:     make(chan *Error, 1),
	}
}
Constructs a new channel with the given framing rules
package amqp
import (
	"reflect"
	"sync"
	"sync/atomic"
)
const frameHeaderSize = 1 + 2 + 4 + 1
type Channel struct {
	destructor sync.Once
	m          sync.Mutex  
	confirmM   sync.Mutex  
	notifyM    sync.RWMutex
	connection *Connection
	rpc       chan message
	consumers *consumers
	id uint16
	closed int32
	noNotify bool
	closes []chan *Error
	flows []chan bool
	returns []chan Return
	cancels []chan string
	confirms   *confirms
	confirming bool
	errors chan *Error
	recv func(*Channel, frame) error
	message messageWithContent
	header  *headerFrame
	body    []byte
}