Skip to content

Commit

Permalink
net/rpc: document that Register logs to standard error
Browse files Browse the repository at this point in the history
Also fix spurious & in example.

Fixes #4349.
Fixes #4489.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6905058
  • Loading branch information
rsc committed Dec 10, 2012
1 parent 4f3dd83 commit 91527eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pkg/net/rpc/server.go
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 91527eb

Please sign in to comment.