code: func (c *EncodedConn) bindRecvChan(subject, queue string, channel interface{}) (*Subscription, error) {
  	chVal := reflect.ValueOf(channel)
  	if chVal.Kind() != reflect.Chan {
  		return nil, ErrChanArg
  	}
  	argType := chVal.Type().Elem()
  
  	cb := func(m *Msg) {
  		var oPtr reflect.Value
  		if argType.Kind() != reflect.Ptr {
  			oPtr = reflect.New(argType)
  		} else {
  			oPtr = reflect.New(argType.Elem())
  		}
  		if err := c.Enc.Decode(m.Subject, m.Data, oPtr.Interface()); err != nil {
  			c.Conn.err = errors.New("nats: Got an error trying to unmarshal: " + err.Error())
  			if c.Conn.Opts.AsyncErrorCB != nil {
  				c.Conn.ach.push(func() { c.Conn.Opts.AsyncErrorCB(c.Conn, m.Sub, c.Conn.err) })
  			}
  			return
  		}
  		if argType.Kind() != reflect.Ptr {
  			oPtr = reflect.Indirect(oPtr)
  		}
  		// This is a bit hacky, but in this instance we may be trying to send to a closed channel.
  		// and the user does not know when it is safe to close the channel.
  		defer func() {
  			// If we have panicked, recover and close the subscription.
  			if r := recover(); r != nil {
  				m.Sub.Unsubscribe()
  			}
  		}()
  		// Actually do the send to the channel.
  		chVal.Send(oPtr)
  	}
  
  	return c.Conn.subscribe(subject, queue, cb, nil, false)
  }
docs: // Internal function to bind receive operations for a channel.