func MessageTypeToMessage(mt MessageType) (Message, error) {
	switch mt {
	case Tversion:
		return &VersionRequest{}, nil
	case Rversion:
		return &VersionResponse{}, nil
	case Tauth:
		return &AuthRequest{}, nil
	case Rauth:
		return &AuthResponse{}, nil
	case Tattach:
		return &AttachRequest{}, nil
	case Rattach:
		return &AttachResponse{}, nil
	case Tflush:
		return &FlushRequest{}, nil
	case Rflush:
		return &FlushResponse{}, nil
	case Twalk:
		return &WalkRequest{}, nil
	case Rwalk:
		return &WalkResponse{}, nil
	case Topen:
		return &OpenRequest{}, nil
	case Ropen:
		return &OpenResponse{}, nil
	case Tcreate:
		return &CreateRequest{}, nil
	case Rcreate:
		return &CreateResponse{}, nil
	case Tread:
		return &ReadRequest{}, nil
	case Rread:
		return &ReadResponse{}, nil
	case Twrite:
		return &WriteRequest{}, nil
	case Rwrite:
		return &WriteResponse{}, nil
	case Tclunk:
		return &ClunkRequest{}, nil
	case Rclunk:
		return &ClunkResponse{}, nil
	case Tremove:
		return &RemoveRequest{}, nil
	case Rremove:
		return &RemoveResponse{}, nil
	case Tstat:
		return &StatRequest{}, nil
	case Rstat:
		return &StatResponse{}, nil
	case Twstat:
		return &WriteStatRequest{}, nil
	case Rwstat:
		return &WriteStatResponse{}, nil
	case Rerror:
		return &ErrorResponse{}, nil
	default:
		return nil, ErrUnknownMessageType
	}
}
// MessageTypeToMessage returns an empty Message based on the provided message
// type.
MessageTypeToMessage returns an empty Message based on the provided message
type.
// MessageTypeToMessage returns an empty Message based on the provided message // type .
func MessageTypeToMessage(mt MessageType) (Message, error) {
	switch mt {
	case Tversion:
		return &VersionRequest{}, nil
	case Rversion:
		return &VersionResponse{}, nil
	case Tauth:
		return &AuthRequest{}, nil
	case Rauth:
		return &AuthResponse{}, nil
	case Tattach:
		return &AttachRequest{}, nil
	case Rattach:
		return &AttachResponse{}, nil
	case Tflush:
		return &FlushRequest{}, nil
	case Rflush:
		return &FlushResponse{}, nil
	case Twalk:
		return &WalkRequest{}, nil
	case Rwalk:
		return &WalkResponse{}, nil
	case Topen:
		return &OpenRequest{}, nil
	case Ropen:
		return &OpenResponse{}, nil
	case Tcreate:
		return &CreateRequest{}, nil
	case Rcreate:
		return &CreateResponse{}, nil
	case Tread:
		return &ReadRequest{}, nil
	case Rread:
		return &ReadResponse{}, nil
	case Twrite:
		return &WriteRequest{}, nil
	case Rwrite:
		return &WriteResponse{}, nil
	case Tclunk:
		return &ClunkRequest{}, nil
	case Rclunk:
		return &ClunkResponse{}, nil
	case Tremove:
		return &RemoveRequest{}, nil
	case Rremove:
		return &RemoveResponse{}, nil
	case Tstat:
		return &StatRequest{}, nil
	case Rstat:
		return &StatResponse{}, nil
	case Twstat:
		return &WriteStatRequest{}, nil
	case Rwstat:
		return &WriteStatResponse{}, nil
	case Rerror:
		return &ErrorResponse{}, nil
	default:
		return nil, ErrUnknownMessageType
	}
}
func MessageTypeToMessage ( mt MessageType ) ( Message , error ) { switch mt { case Tversion : return & VersionRequest { } , nil case Rversion : return & VersionResponse { } , nil case Tauth : return & AuthRequest { } , nil case Rauth : return & AuthResponse { } , nil case Tattach : return & AttachRequest { } , nil case Rattach : return & AttachResponse { } , nil case Tflush : return & FlushRequest { } , nil case Rflush : return & FlushResponse { } , nil case Twalk : return & WalkRequest { } , nil case Rwalk : return & WalkResponse { } , nil case Topen : return & OpenRequest { } , nil case Ropen : return & OpenResponse { } , nil case Tcreate : return & CreateRequest { } , nil case Rcreate : return & CreateResponse { } , nil case Tread : return & ReadRequest { } , nil case Rread : return & ReadResponse { } , nil case Twrite : return & WriteRequest { } , nil case Rwrite : return & WriteResponse { } , nil case Tclunk : return & ClunkRequest { } , nil case Rclunk : return & ClunkResponse { } , nil case Tremove : return & RemoveRequest { } , nil case Rremove : return & RemoveResponse { } , nil case Tstat : return & StatRequest { } , nil case Rstat : return & StatResponse { } , nil case Twstat : return & WriteStatRequest { } , nil case Rwstat : return & WriteStatResponse { } , nil case Rerror : return & ErrorResponse { } , nil default : return nil , ErrUnknownMessageType } }
MessageTypeToMessage returns an empty Message based on the provided message
type.
MessageTypeToMessage returns an empty Message based on the provided message type .