-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix check reply argument type #53
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
Open
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fix: fix reply arg check
ray7jq
commented
Feb 17, 2022
via email
TD
... ------------------ 原始邮件 ------------------
发件人: "Dub ***@***.***>;
发送时间: 2022年2月17日(星期四) 晚上8:34
收件人: ***@***.***>;
抄送: ***@***.***>;
主题: [geektutu/7days-golang] Fix check reply argument type (PR #53)
7days-golang/gee-rpc/day3-service/service.go
Line 75 in cf36443
if !isExportedOrBuiltinType(argType) || !isExportedOrBuiltinType(replyType) {
这里只检验了reply Argument是否为导出/内置类型, 没有检验其是否为指针
按照net/rpc的接口, 这是无法Register进入services的
是否应该加上检查是否为指针的操作?
You can view, comment on, or merge this pull request online at:
#53
Commit Summary
ffbd7c8 Update geerpc-day1.md
3d95165 fix: fix reply arg check
File Changes
(6 files)
M gee-rpc/day3-service/service.go (7)
M gee-rpc/day4-timeout/service.go (7)
M gee-rpc/day5-http-debug/service.go (7)
M gee-rpc/day6-load-balance/service.go (7)
M gee-rpc/day7-registry/service.go (7)
M gee-rpc/doc/geerpc-day1.md (2)
Patch Links:
https://github.com/geektutu/7days-golang/pull/53.patch
https://github.com/geektutu/7days-golang/pull/53.diff
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
7days-golang/gee-rpc/day3-service/service.go
Line 75 in cf36443
这里只检验了reply Argument是否为导出/内置类型, 没有检验其是否为指针
按照net/rpc的接口, 这是无法Register进入services的
是否应该加上检查是否为指针的操作?