Code review comment for lp:~thumper/juju-core/default-command-info

Revision history for this message
William Reade (fwereade) wrote :

On 2013/11/06 11:45:34, jameinel wrote:
> We have a cmd.Context object which is passed to all the commands, and
is
> something that we can then pass into internal code.

> It seems better to have it on an object, rather than as a package
level
> function.

> does that make sense to you?

That's actually starting to make more and more sense, because:

1) the value of this gets lower and lower as more functionality moves
behind the API -- it becomes more and more convenient to just write to
the cmd.Context that's right there in Run

2) bootstrap and (manual) add-machine feel like the major exceptions to
the above, but both of those need the context anyway for sudo (and given
that we probably ought not to be reading env vars directly, we probably
ought to be communicating those to bootstrap via some such context too).

What's the actual set of potential users for this code once the CLI
talks API?

https://codereview.appspot.com/22320043/

« Back to merge proposal