code: func NewControlPacketWithHeader(fh FixedHeader) (ControlPacket, error) {
  	switch fh.MessageType {
  	case Connect:
  		return &ConnectPacket{FixedHeader: fh}, nil
  	case Connack:
  		return &ConnackPacket{FixedHeader: fh}, nil
  	case Disconnect:
  		return &DisconnectPacket{FixedHeader: fh}, nil
  	case Publish:
  		return &PublishPacket{FixedHeader: fh}, nil
  	case Puback:
  		return &PubackPacket{FixedHeader: fh}, nil
  	case Pubrec:
  		return &PubrecPacket{FixedHeader: fh}, nil
  	case Pubrel:
  		return &PubrelPacket{FixedHeader: fh}, nil
  	case Pubcomp:
  		return &PubcompPacket{FixedHeader: fh}, nil
  	case Subscribe:
  		return &SubscribePacket{FixedHeader: fh}, nil
  	case Suback:
  		return &SubackPacket{FixedHeader: fh}, nil
  	case Unsubscribe:
  		return &UnsubscribePacket{FixedHeader: fh}, nil
  	case Unsuback:
  		return &UnsubackPacket{FixedHeader: fh}, nil
  	case Pingreq:
  		return &PingreqPacket{FixedHeader: fh}, nil
  	case Pingresp:
  		return &PingrespPacket{FixedHeader: fh}, nil
  	}
  	return nil, fmt.Errorf("unsupported packet type 0x%x", fh.MessageType)
  }
docs: //NewControlPacketWithHeader is used to create a new ControlPacket of the type
  //specified within the FixedHeader that is passed to the function.
  //The newly created ControlPacket is empty and a pointer is returned.