> Got it from packages like goamz. But personally don't need it.
i think goamz is different because it really is almost all gustavo's
work. YMMV, whatever.
https://codereview.appspot.com/6852065/diff/6001/golxc.go#newcode370
golxc.go:370: log.Fatalf("error executing %q: %v",
strings.Join(cmd.Args, " "), err)
On 2012/11/20 16:34:04, TheMue wrote:
> On 2012/11/20 15:20:11, rog wrote:
> > d
> > but i wonder whether the error message here should actually
incorporate the
> > error printed to stderr. nothing that calls run actually uses the
stderr
> > returned, and the error returned by cmd.Run is, in most cases,
almost
> > meaningless.
> The err here is an error of Command executing the command, not the
stderr of the
> executed command. I changed it to mode it more clear. So far we have
no usage
> for stderr, but it's also not everything implemented. If there stays
no need it
> will be removed.
my point is that if a command fails, the only message we'll get will be
"exit status 1" or whatever, and the useful error message that the
command has printed to stderr will be discarded.
i think we should put at least some of that information into the err
return.
https://codereview.appspot.com/6852065/diff/11001/golxc.go#newcode273
golxc.go:273: func (c *Container) wait(states ...State) error {
given that nothing is actually making use of the functionality yet, we
could just have wait(state State) and not bother with combining states
at all. just a then this function is only 5 lines. just a thought.
LGTM apart from the error messages. i think we don't want to discard the
important information printed to stderr.
https:/ /codereview. appspot. com/6852065/ diff/6001/ golxc.go
File golxc.go (right):
https:/ /codereview. appspot. com/6852065/ diff/6001/ golxc.go# newcode9
golxc.go:9: // Frank Mueller <email address hidden>
On 2012/11/20 16:34:04, TheMue wrote:
> On 2012/11/20 15:20:11, rog wrote:
> > do we need individual attributions?
> Got it from packages like goamz. But personally don't need it.
i think goamz is different because it really is almost all gustavo's
work. YMMV, whatever.
https:/ /codereview. appspot. com/6852065/ diff/6001/ golxc.go# newcode370 Join(cmd. Args, " "), err)
golxc.go:370: log.Fatalf("error executing %q: %v",
strings.
On 2012/11/20 16:34:04, TheMue wrote:
> On 2012/11/20 15:20:11, rog wrote:
> > d
> > but i wonder whether the error message here should actually
incorporate the
> > error printed to stderr. nothing that calls run actually uses the
stderr
> > returned, and the error returned by cmd.Run is, in most cases,
almost
> > meaningless.
> The err here is an error of Command executing the command, not the
stderr of the
> executed command. I changed it to mode it more clear. So far we have
no usage
> for stderr, but it's also not everything implemented. If there stays
no need it
> will be removed.
my point is that if a command fails, the only message we'll get will be
"exit status 1" or whatever, and the useful error message that the
command has printed to stderr will be discarded.
i think we should put at least some of that information into the err
return.
https:/ /codereview. appspot. com/6852065/ diff/11001/ golxc.go
File golxc.go (right):
https:/ /codereview. appspot. com/6852065/ diff/11001/ golxc.go# newcode35 container' s/
golxc.go:35: // LogLevel represents a containers log level.
s/containers/
https:/ /codereview. appspot. com/6852065/ diff/11001/ golxc.go# newcode86
golxc.go:86: c.logLevel = logLevel
is it really worth having the setter method here?
could we just export the relevant fields?
https:/ /codereview. appspot. com/6852065/ diff/11001/ golxc.go# newcode273
golxc.go:273: func (c *Container) wait(states ...State) error {
given that nothing is actually making use of the functionality yet, we
could just have wait(state State) and not bother with combining states
at all. just a then this function is only 5 lines. just a thought.
https:/ /codereview. appspot. com/6852065/