See? It's a pointer. If api's generation of this field is not a pointer, it will be a trouble in api logic. since you have to do a if judgement to conver the filed to a pointer before you call rpc server.
The error is
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environments (please complete the following information):
OS: [e.g. Linux]
go-zero version [e.g. 1.2.1]
goctl version [e.g. 1.2.1, optional]
More description
Add any other context about the problem here.
Describe the bug one block of my api is defined as:
The keyword is optional. When I generate my code with goctl. The types.go is shown as blow:
Why the Keyword is not a pointer since it's optional? Let's see the protobuf's generation:
The code generated:
See? It's a pointer. If api's generation of this field is not a pointer, it will be a trouble in api logic. since you have to do a if judgement to conver the filed to a pointer before you call rpc server.
The error is
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Environments (please complete the following information):
More description Add any other context about the problem here.