~wallyworld/juju-core/fast-lxc-everywhere

Viewing all changes in revision 47.

  • Committer: William Reade
  • Author(s): William Reade
  • Date: 2012-02-01 14:34:44 UTC
  • mfrom: (37.3.40 go-add-control-package-redux)
  • Revision ID: fwereade@gmail.com-20120201143444-xys3315x004hv9f0
Initial attempt at a juju command-line tool

Features worthy of comment:

* Partly inspired by $GOROOT/src/cmd/go, but eschews IMO-nasty globals in
  favour of testability.
* Uses rog's gnuflag package because it's convenient and correct and no
  harder than using the builtin flag package.
* I don't like the way we have 2 code paths that handle errors and usage-
  printing, but since flag insists on using stderr (and gnuflag rightly
  preserves this behaviour) I think it's necessary.
* `go build -o juju` inside cmd/juju should produce a binary you can play
  around with; this is probably the best way to actually explore how it
  works and whether it's functionally acceptable (as opposed to
  stylistically, technically, etc).
* Includes a not-really-functional implementation of juju.Conn, which I
  can't actually use (or test effectively) until we have environ types
  (including "dummy") registered globally; but alows me to demonstrate
  how I vaguely intend a Command should work.

R=rog, niemeyer
CC=
https://codereview.appspot.com/5554075

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: