Fix go vet errors
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
54c213e8a7
commit
514ca2d407
3 changed files with 5 additions and 10 deletions
|
@ -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 {
|
||||
|
|
|
@ -416,7 +416,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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue