-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
protoc-gen-go/grpc: make grpc identical to v1.3.5 #1113
Conversation
Even through the grpc package is excluded from our compatibility agreement, the v1.4.0 release accidentally reverted the package to an older revision. Update this code to be identical to the v1.3.5 release (barring non-semantic documentation changes). Fixes #1111
methName := generator.CamelCase(method.GetName()) | ||
statusPkg := string(g.gen.AddImport(statusPkgPath)) | ||
codePkg := string(g.gen.AddImport(codePkgPath)) | ||
g.P("return ", nilArg, statusPkg, `.Errorf(`, codePkg, `.Unimplemented, "method `, methName, ` not implemented")`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsnet
May I ask why you are using the Errorf
method? In my view, it should be the Error
method since the error message doesn’t require formatting.
please let me know if you remember the answer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea.
Even through the grpc package is excluded from our compatibility agreement,
the v1.4.0 release accidentally reverted the package to an older revision.
Update this code to be identical to the v1.3.5 release (barring non-semantic
documentation changes).
Fixes #1111