rpc: remove 'exported or builtin' restriction for parameters (#20332)

* rpc: remove 'exported or builtin' restriction for parameters

There is no technial reason for this restriction because package reflect
can create values of any type. Requiring parameters and return values to
be exported causes a lot of noise in package exports.

* rpc: fix staticcheck warnings
This commit is contained in:
Felix Lange
2019-11-20 09:06:21 +01:00
committed by Péter Szilágyi
parent 9c6cf960b4
commit 8008c5b1fa
9 changed files with 36 additions and 76 deletions

View File

@ -153,14 +153,6 @@ type ConnRemoteAddr interface {
RemoteAddr() string
}
// connWithRemoteAddr overrides the remote address of a connection.
type connWithRemoteAddr struct {
Conn
addr string
}
func (c connWithRemoteAddr) RemoteAddr() string { return c.addr }
// jsonCodec reads and writes JSON-RPC messages to the underlying connection. It also has
// support for parsing arguments and serializing (result) objects.
type jsonCodec struct {