New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write to Stderr directly for error output. #51
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really neat \o/
Just couple of comments but nothing blocking, I think :D
Thank you!
p.pendingError = nil | ||
return 0, err | ||
} | ||
panic("unreachable") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really necessary here? It looks to me like you've covered all the possibilities - when would you expect to panic here now?
If you strongly believe in its necessity, I think we'd want to unit test that we can reach it ;D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files were just copied from the juju/juju/cmd/cmdtesting, and the only thing I changed was the licence header.
jc "github.com/juju/testing/checkers" | ||
gc "gopkg.in/check.v1" | ||
|
||
"github.com/juju/cmd/cmdtesting" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this belongs in the 2nd import block.
gc "gopkg.in/check.v1" | ||
|
||
"github.com/juju/cmd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe in the 2nd import block too?...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because this is the package.
|
||
// NewSeqPrompter returns a prompter that can be used to check a sequence of | ||
// IO interactions. Expected input from the user is marked with the | ||
// given user input marker (for example a distinctive unicode character |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't "for example,..." need a comma after it?
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-cmd |
Using the logger for error output was a bad call.
This branch also brings in the non-juju specific extra methods used for testing commands.