From: Russ Cox Date: Mon, 10 Dec 2012 06:42:53 +0000 (-0500) Subject: net/rpc: document that Register logs to standard error X-Git-Tag: go1.1rc2~1686 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=91527eb1d7e3054e660692638a526340d19d14b5;p=gostls13.git net/rpc: document that Register logs to standard error Also fix spurious & in example. Fixes #4349. Fixes #4489. R=golang-dev, adg CC=golang-dev https://golang.org/cl/6905058 --- diff --git a/src/pkg/net/rpc/server.go b/src/pkg/net/rpc/server.go index 8898b98aba..e71b6fb1a4 100644 --- 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, "ient, 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 @@ func isExportedOrBuiltinType(t reflect.Type) bool { // - 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 {