When using kitex or cwgo to generate rpc/http, an error occurs as shown below:
add imports failed error: template: :1:5: executing "" at <index (index (index .Methods 0).Args 0).Deps 0>: error calling index: reflect: slice index out of range
The reason for this error is that kitex limits the number of generated method parameters to no more than 4.
In the above picture registerUser registered user input 4 parameters can be generated normally, but in the picture below there are many parameters, and a title error occurs.
At this time, define the structure and use the structure error parameters.
Use the kitex command or cwgo command again to generate normally.