-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Conversation
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 |
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.
This doesn't seem like the right change. This is to register codecs, not compressors.
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.
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?
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.
Line 72 is for function RegisterCompressor
, and line 111 is for RegisterCodec
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.
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.
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.
Ohhhh, sorry. I see. I read it wrong.
Yeah this look like the right fix. Thanks for the change!
@@ -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 |
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.
Ohhhh, sorry. I see. I read it wrong.
Yeah this look like the right fix. Thanks for the change!
modify Compressors to Codecs
RELEASE NOTES: None