Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1688)

Issue 7324048: rpc: always use structs

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by rog
Modified:
11 years, 1 month ago
Reviewers:
dimitern, mp+148238, fwereade
Visibility:
Public.

Description

rpc: always use structs Go 1.0.2 is more strict about json unmarshalling from nil, so this patch makes the rpc package strict about requiring structs for all parameters and results. https://code.launchpad.net/~rogpeppe/juju-core/214-rpc-use-structs-only/+merge/148238 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : rpc: always use structs #

Patch Set 3 : rpc: always use structs #

Patch Set 4 : rpc: always use structs #

Total comments: 2

Patch Set 5 : rpc: always use structs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -31 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M rpc/client.go View 1 2 3 4 4 chunks +17 lines, -6 lines 0 comments Download
M rpc/rpc.go View 1 5 chunks +14 lines, -3 lines 0 comments Download
M rpc/rpc_test.go View 1 7 chunks +84 lines, -8 lines 0 comments Download
M rpc/server.go View 1 5 chunks +13 lines, -9 lines 0 comments Download
M state/api/apiserver.go View 1 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 4
rog
Please take a look.
11 years, 1 month ago (2013-02-13 17:30:27 UTC) #1
fwereade
LGTM; thanks in particular for the logging and the extra tests. https://codereview.appspot.com/7324048/diff/4001/rpc/client.go File rpc/client.go (right): ...
11 years, 1 month ago (2013-02-13 17:37:51 UTC) #2
dimitern
LGTM. I like the changes - it seems due to that bug some things actually ...
11 years, 1 month ago (2013-02-13 17:38:13 UTC) #3
rog
11 years, 1 month ago (2013-02-13 17:42:08 UTC) #4
*** Submitted:

rpc: always use structs

Go 1.0.2 is more strict about json unmarshalling from nil,
so this patch makes the rpc package strict about requiring
structs for all parameters and results.

R=dimitern
CC=
https://codereview.appspot.com/7324048

https://codereview.appspot.com/7324048/diff/4001/rpc/client.go
File rpc/client.go (right):

https://codereview.appspot.com/7324048/diff/4001/rpc/client.go#newcode208
rpc/client.go:208: // the response value may be nil to discard any result value.
On 2013/02/13 17:37:51, fwereade wrote:
> "to indicate that any result should be discarded", maybe?

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b