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

Issue 8851045: state/statecmd: fix ServiceGet

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 11 months ago by rog
Modified:
10 years, 11 months ago
Reviewers:
Danilo, dimitern, mp+159803, fwereade, TheMue
Visibility:
Public.

Description

state/statecmd: fix ServiceGet Fixes bugs #1130149 and #1170425. https://code.launchpad.net/~rogpeppe/juju-core/293-juju-get-fixes/+merge/159803 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state/statecmd: fix ServiceGet #

Patch Set 3 : state/statecmd: fix ServiceGet #

Total comments: 4

Patch Set 4 : state/statecmd: fix ServiceGet #

Total comments: 2

Patch Set 5 : state/statecmd: fix ServiceGet #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -82 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/juju/config_test.go View 1 2 3 4 2 chunks +14 lines, -7 lines 0 comments Download
M state/apiserver/api_test.go View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M state/statecmd/config_test.go View 1 2 3 2 chunks +115 lines, -58 lines 0 comments Download
M state/statecmd/get.go View 1 2 3 4 4 chunks +13 lines, -15 lines 0 comments Download

Messages

Total messages: 7
rog
Please take a look.
10 years, 11 months ago (2013-04-19 11:54:13 UTC) #1
dimitern
LGTM, please take care of the bugs when landing.
10 years, 11 months ago (2013-04-19 12:30:55 UTC) #2
TheMue
LGTM
10 years, 11 months ago (2013-04-19 12:34:20 UTC) #3
fwereade
https://codereview.appspot.com/8851045/diff/5001/cmd/juju/config_test.go File cmd/juju/config_test.go (left): https://codereview.appspot.com/8851045/diff/5001/cmd/juju/config_test.go#oldcode35 cmd/juju/config_test.go:35: "value": nil, don't we want the actual value in ...
10 years, 11 months ago (2013-04-19 12:36:21 UTC) #4
Danilo
LGTM with a few minor comments. https://codereview.appspot.com/8851045/diff/5001/state/statecmd/get.go File state/statecmd/get.go (right): https://codereview.appspot.com/8851045/diff/5001/state/statecmd/get.go#newcode58 state/statecmd/get.go:58: if s, ok ...
10 years, 11 months ago (2013-04-19 12:45:38 UTC) #5
fwereade
LGTM with a single test in cmd/juju for a nondefault value. I know it's covered ...
10 years, 11 months ago (2013-04-19 12:55:40 UTC) #6
rog
10 years, 11 months ago (2013-04-19 13:22:22 UTC) #7
*** Submitted:

state/statecmd: fix ServiceGet

Fixes bugs #1130149 and #1170425.

R=dimitern, TheMue, fwereade, danilo.segan
CC=
https://codereview.appspot.com/8851045

https://codereview.appspot.com/8851045/diff/5001/state/statecmd/get.go
File state/statecmd/get.go (right):

https://codereview.appspot.com/8851045/diff/5001/state/statecmd/get.go#newcode58
state/statecmd/get.go:58: if s, ok := serviceCfg[k]; ok {
On 2013/04/19 12:45:38, danilo.segan wrote:
> I know this is a language "feature", but I don't think it really helps
> readability.  I am sure most of the Go developers would disagree with me on
> this, so I am just throwing it out there :)

it's a standard idiom, and reads easily when you're used to it.

it also constrains the scope of the variables, so you don't need to look any
further than the if statement for effects (not that's a particular issue here)
Sign in to reply to this message.

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