Conversation
19603e4 to
d2245ca
Compare
|
Any news about this PR? When the merge will be made? |
memcache/memcache.go
Outdated
|
|
||
| func parseStatsLine(s []byte, expectedPrefix []byte) (uint64, error) { | ||
| if !bytes.HasPrefix(s, expectedPrefix) { | ||
| return 0, errors.New("line does not start with exceptedPrefix") |
There was a problem hiding this comment.
errors.New allocates each time. I'd make that a global err variable instead.
memcache/memcache.go
Outdated
|
|
||
| // Statistics is a record of memcached usage stats. | ||
| type Statistics struct { | ||
| // Counter of cache hits. |
There was a problem hiding this comment.
Write complete sentences.
See https://github.com/golang/go/wiki/CodeReviewComments#comment-sentences
// Hits is ...
(ending in a period)
memcache/memcache.go
Outdated
| } | ||
|
|
||
|
|
||
| func (c *Client) Stats(addr net.Addr) (*Statistics, error) { |
There was a problem hiding this comment.
This lacks comments.
Also, why does it take an Addr? It seems like most people would want aggregated statistics across all nodes for a method named "Stats".
Maybe this should be called "NodeStats".
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
|
@bradfitz , thanks for your comments, it was very useful. Could you please take a look at my changes again. |
|
Hi! My commit has a committer email '[email protected]', and I was told that Yandex LLC has a CLA agreement (mostly contributing to the Chromium repository). Could you please check, why I did not pass the CLA check. Thanks! |
Hi!
I am very new to Go programming language, but I'd like to implement Statistics (https://cloud.google.com/appengine/docs/go/memcache/reference?csw=1#Statistics) in gomemcache library.
Could you please, take a look on my patch? I will be pleased to fix any problems in it you find.
Thank you in advance.
This is how I use it