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

Issue 6854088: environs/config: use "" instead of nil

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by rog
Modified:
11 years, 5 months ago
Reviewers:
mp+135956, niemeyer, gz
Visibility:
Public.

Description

environs/config: use "" instead of nil As discussed on line. Tests now pass with inaccessible ~/.ssh and ~/.juju. https://code.launchpad.net/~rogpeppe/juju-core/168-config-fix-hopefully/+merge/135956 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : environs/config: use "" instead of nil #

Patch Set 3 : environs/config: use "" instead of nil #

Patch Set 4 : environs/config: use "" instead of nil #

Patch Set 5 : environs/config: use "" instead of nil #

Total comments: 5

Patch Set 6 : environs/config: use "" instead of nil #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -74 lines) Patch
A [revision details] View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M environs/config.go View 1 chunk +1 line, -1 line 0 comments Download
M environs/config/config.go View 1 2 7 chunks +17 lines, -20 lines 0 comments Download
M environs/config/config_test.go View 10 chunks +14 lines, -27 lines 0 comments Download
M environs/dummy/environs_test.go View 1 chunk +8 lines, -7 lines 0 comments Download
M environs/ec2/local_test.go View 1 2 3 4 1 chunk +11 lines, -10 lines 0 comments Download
M environs/openstack/config_test.go View 2 chunks +5 lines, -1 line 0 comments Download
M environs/openstack/local_test.go View 2 chunks +6 lines, -2 lines 0 comments Download
M juju/conn_test.go View 5 chunks +5 lines, -1 line 0 comments Download
M state/state_test.go View 10 chunks +10 lines, -5 lines 0 comments Download

Messages

Total messages: 6
rog
Please take a look.
11 years, 5 months ago (2012-11-23 18:03:28 UTC) #1
rog
Please take a look.
11 years, 5 months ago (2012-11-23 18:08:33 UTC) #2
rog
Please take a look.
11 years, 5 months ago (2012-11-23 18:09:28 UTC) #3
niemeyer
LGTM, thanks! Please just revert the gofmt changes on bootstrap.go, as we discussed.
11 years, 5 months ago (2012-11-23 18:25:48 UTC) #4
rog
*** Submitted: environs/config: use "" instead of nil As discussed on line. Tests now pass ...
11 years, 5 months ago (2012-11-23 18:26:30 UTC) #5
gz
11 years, 5 months ago (2012-11-23 18:28:06 UTC) #6
Having "" as the special value doesn't really appeal, but seems an obvious
improvement over nil if it actually needs to be specified in the config.

https://codereview.appspot.com/6854088/diff/10001/environs/dummy/environs_tes...
File environs/dummy/environs_test.go (right):

https://codereview.appspot.com/6854088/diff/10001/environs/dummy/environs_tes...
environs/dummy/environs_test.go:18: "authorized-keys": "foo",
I prefer something like 'an-ssh-key' for the testing value, easier to grep for
than 'foo' if you see it in test error output.

https://codereview.appspot.com/6854088/diff/10001/environs/ec2/local_test.go
File environs/ec2/local_test.go (right):

https://codereview.appspot.com/6854088/diff/10001/environs/ec2/local_test.go#...
environs/ec2/local_test.go:37: "authorized-keys": "foo",
Again, 'an-ssh-key' or similar.

https://codereview.appspot.com/6854088/diff/10001/environs/openstack/config_t...
File environs/openstack/config_test.go (right):

https://codereview.appspot.com/6854088/diff/10001/environs/openstack/config_t...
environs/openstack/config_test.go:56: "authorized-keys": "foo",
Likewise.

https://codereview.appspot.com/6854088/diff/10001/environs/openstack/local_te...
File environs/openstack/local_test.go (right):

https://codereview.appspot.com/6854088/diff/10001/environs/openstack/local_te...
environs/openstack/local_test.go:28: "authorized-keys": "foo",
Likewise.

https://codereview.appspot.com/6854088/diff/10001/juju/bootstrap.go
File juju/bootstrap.go (right):

https://codereview.appspot.com/6854088/diff/10001/juju/bootstrap.go#newcode78
juju/bootstrap.go:78: MaxPathLen: 0, // Disallow delegation for now.
Heh, same go fmt weirdness as the bootstrap move branch. At least bzr should be
kind to you over resolving conflicts.
Sign in to reply to this message.

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