raw/handler.go
func WriteResponse(response *tchannel.InboundCallResponse, resp *Res) error {
	if resp.SystemErr != nil {
		return response.SendSystemError(resp.SystemErr)
	}
	if resp.IsErr {
		if err := response.SetApplicationError(); err != nil {
			return err
		}
	}
	if err := tchannel.NewArgWriter(response.Arg2Writer()).Write(resp.Arg2); err != nil {
		return err
	}
	return tchannel.NewArgWriter(response.Arg3Writer()).Write(resp.Arg3)
}
func WriteResponse(response *tchannel.InboundCallResponse, resp *Res) error {
	if resp.SystemErr != nil {
		return response.SendSystemError(resp.SystemErr)
	}
	if resp.IsErr {
		if err := response.SetApplicationError(); err != nil {
			return err
		}
	}
	if err := tchannel.NewArgWriter(response.Arg2Writer()).Write(resp.Arg2); err != nil {
		return err
	}
	return tchannel.NewArgWriter(response.Arg3Writer()).Write(resp.Arg3)
}
// WriteResponse writes the given Res to the InboundCallResponse.