FAQ
Reviewers: golang-dev_googlegroups.com,

Message:
Hello golang-dev@googlegroups.com,

I'd like you to review this change to
https://code.google.com/p/go/


Description:
net/rpc: document that Register logs to standard error
Also fix spurious & in example.

Fixes issue 4349.
Fixes issue 4489.

Please review this at https://codereview.appspot.com/6905058/

Affected files:
M src/pkg/net/rpc/server.go


Index: src/pkg/net/rpc/server.go
===================================================================
--- a/src/pkg/net/rpc/server.go
+++ b/src/pkg/net/rpc/server.go
@@ -112,7 +112,7 @@

// Asynchronous call
quotient := new(Quotient)
- divCall := client.Go("Arith.Divide", args, &quotient, nil)
+ divCall := client.Go("Arith.Divide", args, quotient, nil)
replyCall := <-divCall.Done // will be equal to divCall
// check errors, print, etc.

@@ -219,8 +219,8 @@
// - exported method
// - two arguments, both pointers to exported structs
// - one return value, of type error
-// It returns an error if the receiver is not an exported type or has no
-// suitable methods.
+// It returns an error if the receiver is not an exported type or has
+// no methods or unsuitable methods. It also logs the error using package
log.
// The client accesses each method using a string of the
form "Type.Method",
// where Type is the receiver's concrete type.
func (server *Server) Register(rcvr interface{}) error {

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 9, '12 at 9:07a
activeDec 9, '12 at 9:07a
posts1
users1
websitegolang.org

1 user in discussion

Rsc: 1 post

People

Translate

site design / logo © 2022 Grokbase