Merge pull request #149 from mlaventure/fix-vet-errors

Fix go vet errors
This commit is contained in:
Michael Crosby 2016-03-22 10:54:08 -07:00
commit 142e22a4dc
3 changed files with 5 additions and 10 deletions

View file

@ -211,9 +211,7 @@ var startCommand = cli.Command{
}
}()
}
if err := waitForExit(c, events, id, "init", restoreAndCloseStdin); err != nil {
fatal(err.Error(), 1)
}
waitForExit(c, events, id, "init", restoreAndCloseStdin)
}
},
}
@ -491,9 +489,7 @@ var execCommand = cli.Command{
}
}()
}
if err := waitForExit(c, events, context.String("id"), context.String("pid"), restoreAndCloseStdin); err != nil {
fatal(err.Error(), 1)
}
waitForExit(c, events, context.String("id"), context.String("pid"), restoreAndCloseStdin)
}
},
}
@ -571,7 +567,7 @@ var updateCommand = cli.Command{
},
}
func waitForExit(c types.APIClient, events types.API_EventsClient, id, pid string, closer func()) error {
func waitForExit(c types.APIClient, events types.API_EventsClient, id, pid string, closer func()) {
for {
e, err := events.Recv()
if err != nil {
@ -584,7 +580,6 @@ func waitForExit(c types.APIClient, events types.API_EventsClient, id, pid strin
os.Exit(int(e.Status))
}
}
return nil
}
type stdio struct {

View file

@ -418,7 +418,7 @@ func readLogMessages(path string) ([]message, error) {
var m message
if err := dec.Decode(&m); err != nil {
if err == io.EOF {
return out, nil
break
}
return nil, err
}

View file

@ -92,7 +92,7 @@ func readEventLog(s *Supervisor) error {
var e Event
if err := dec.Decode(&e); err != nil {
if err == io.EOF {
return nil
break
}
return err
}