We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
when package name is same with message name in example.proto, and generate code with goctl.
then it will throw 'xxx redeclared in this block'
To Reproduce Steps to reproduce the behavior, if applicable:
proto file looks like:
syntax = "proto3"; package video; option go_package = "./video"; message Video { int64 id = 1; // User author = 2; int64 user_id = 2; string play_url = 3; string cover_url = 4; string title = 8; } message feedReq { int64 latest_time = 1; } message feedResp { repeated Video video_list = 3; optional int64 next_time = 4; } service video { rpc feed(feedReq) returns (feedResp); }
And in /path/to/video/videoclient/video.go
type ( Video = video.Video Video interface { Feed(ctx context.Context, in *FeedReq, opts ...grpc.CallOption) (*FeedResp, error) } )
Video interface and video message conflict
Environments (please complete the following information):
More description
I think when message name is same as package name,goctl should give a suffix to message type name
The text was updated successfully, but these errors were encountered:
Fix zeromicro#2879
ff5e0ed
4bc1b78
Fix #2879
3842283
No branches or pull requests
Describe the bug
when package name is same with message name in example.proto, and generate code with goctl.
then it will throw 'xxx redeclared in this block'
To Reproduce
Steps to reproduce the behavior, if applicable:
proto file looks like:
And in /path/to/video/videoclient/video.go
Video interface and video message conflict
Environments (please complete the following information):
More description
I think when message name is same as package name,goctl should give a suffix to message type name
The text was updated successfully, but these errors were encountered: