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

Issue 6532045: cmd: add cmd.Context to command.Init (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by dave
Modified:
11 years, 7 months ago
Reviewers:
mp+124899, fwereade
Visibility:
Public.

Description

cmd: add cmd.Context to command.Init Pass cmd.Context to command.Init. This is mostly unused, although most invocations of command.Run do not use their Context either. https://code.launchpad.net/~dave-cheney/juju-core/102-cmd-init-context/+merge/124899 (do not edit description out of merge proposal)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -75 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/cmd.go View 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/filevar.go View 2 chunks +11 lines, -2 lines 0 comments Download
M cmd/juju/addunit.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/addunit_test.go View 1 chunk +3 lines, -2 lines 0 comments Download
M cmd/juju/bootstrap.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/cmd_test.go View 10 chunks +19 lines, -18 lines 0 comments Download
M cmd/juju/deploy.go View 1 chunk +2 lines, -2 lines 0 comments Download
M cmd/juju/deploy_test.go View 1 chunk +3 lines, -2 lines 0 comments Download
M cmd/juju/destroyenvironment.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/expose.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/expose_test.go View 1 chunk +3 lines, -2 lines 0 comments Download
M cmd/juju/get.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/set.go View 2 chunks +3 lines, -3 lines 0 comments Download
M cmd/juju/status.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/unexpose.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/unexpose_test.go View 1 chunk +3 lines, -2 lines 0 comments Download
M cmd/juju/upgradejuju.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/juju/upgradejuju_test.go View 2 chunks +6 lines, -4 lines 0 comments Download
M cmd/jujuc/main_test.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/config-get.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/config-get_test.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/juju-log.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/juju-log_test.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/ports.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/ports_test.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/relation-get.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/relation-ids.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/relation-list.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/relation-set.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/relation-set_test.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/server_test.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/unit-get.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujuc/server/unit-get_test.go View 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/jujud/bootstrap.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/machine.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/provisioning.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/unit.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/util_test.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/jujud/version.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/output_test.go View 1 chunk +1 line, -1 line 0 comments Download
M cmd/supercommand.go View 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/supercommand_test.go View 2 chunks +2 lines, -2 lines 0 comments Download
M cmd/util_test.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 1
fwereade
11 years, 7 months ago (2012-09-18 12:54:47 UTC) #1
If I were implementing it I think I would have gone for something more like
c.Config.Open(ctx) inside Run, but I can't come up with a really convincing case
for that being *better*. (OK, it'd be less work, but the work's already done.)
So: LGTM.
Sign in to reply to this message.

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