Skip to content
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

documentation: fix typo in RegisterCodec godoc #5306

Merged
merged 2 commits into from
Apr 13, 2022
Merged

Conversation

RobinLG
Copy link
Contributor

@RobinLG RobinLG commented Apr 12, 2022

modify Compressors to Codecs

RELEASE NOTES: None

modify Compressors to Codecs
@@ -108,7 +108,7 @@ var registeredCodecs = make(map[string]Codec)
// more details.
//
// NOTE: this function must only be called during initialization time (i.e. in
// an init() function), and is not thread-safe. If multiple Compressors are
// an init() function), and is not thread-safe. If multiple Codecs are
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem like the right change. This is to register codecs, not compressors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 72 is the same as line 111. I think line 72 is right, but the comment is for RegisterCodec(...) in line111.
And like you said "This is to register codecs, not compressors." so, the comment should be changed codecs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 72 is for function RegisterCompressor, and line 111 is for RegisterCodec

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, it seem like we can register compressors to RegisterCodec according to the unmodified comments.

Actually we can only register codecs to RegisterCodec according to the code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhhh, sorry. I see. I read it wrong.
Yeah this look like the right fix. Thanks for the change!

@menghanl menghanl closed this Apr 12, 2022
@menghanl menghanl reopened this Apr 13, 2022
@@ -108,7 +108,7 @@ var registeredCodecs = make(map[string]Codec)
// more details.
//
// NOTE: this function must only be called during initialization time (i.e. in
// an init() function), and is not thread-safe. If multiple Compressors are
// an init() function), and is not thread-safe. If multiple Codecs are
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhhh, sorry. I see. I read it wrong.
Yeah this look like the right fix. Thanks for the change!

@menghanl menghanl added the Type: Documentation Documentation or examples label Apr 13, 2022
@menghanl menghanl added this to the 1.47 Release milestone Apr 13, 2022
@menghanl menghanl changed the title comment: modify Compressors to Codecs documentation: fix typo in RegisterCodec godoc Apr 13, 2022
@menghanl menghanl merged commit 7567a5d into grpc:master Apr 13, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Documentation Documentation or examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants