diff options
| author | Rob Pike <r@golang.org> | 2014-01-16 15:57:32 -0800 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2014-01-16 15:57:32 -0800 |
| commit | f8225bdb350f5c7d249f8ed090cf7543901612fa (patch) | |
| tree | df5612d7fab1f528be607f575dd2c84552f3b3cf /src | |
| parent | 8bc32785b99eccf27cede237c974172988bb0c81 (diff) | |
| download | go-f8225bdb350f5c7d249f8ed090cf7543901612fa.tar.xz | |
net/rpc: fix inconsistency in documentation of Service.Register
Falsely claimed an old, no longer true condition that the first argument
must be a pointer.
Fixes #6697
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/53480043
Diffstat (limited to 'src')
| -rw-r--r-- | src/pkg/net/rpc/server.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/net/rpc/server.go b/src/pkg/net/rpc/server.go index 7eb2dcf5a9..6b264b46b8 100644 --- a/src/pkg/net/rpc/server.go +++ b/src/pkg/net/rpc/server.go @@ -217,10 +217,11 @@ func isExportedOrBuiltinType(t reflect.Type) bool { // Register publishes in the server the set of methods of the // receiver value that satisfy the following conditions: // - exported method -// - two arguments, both pointers to exported structs +// - two arguments, both of exported type +// - the second argument is a pointer // - one return value, of type error // 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. +// no suitable 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 { |
