clientv3: change Close() to close() for keepAlive and watchGrpcStream#8066
clientv3: change Close() to close() for keepAlive and watchGrpcStream#8066fanminshi merged 2 commits intoetcd-io:masterfrom
Conversation
|
Can you explain why we need this change in the commit message? |
keepAlive is a private struct that belongs to clientv3 pkg and shouldn't expose a public Close() method.
f67fadb to
4dff7aa
Compare
|
this isn't being exported into godocs and there's no way to access this function, is this really fixing anything? |
|
@xiang90 added commit msg |
it is an aesthetics change I believe. but I am ok with it as long as the commit message is clear. |
|
yeah, it makes code look better. Having a public method on a private struct doesn't seem right to me. |
|
there should be some kind of linting to find these if it's important |
|
this patch should also cover watchGrpcStream.Close instead of doing it piecewise |
|
@heyitsanthony will add watchGrpcStream.Close () to this patch |
private struct shouldn't have public method.
private structs such as keepAlive and watchGrpcStream shouldn't expose a public Close() method.