Merge pull request #695 from miaoyq/replace-gocontext-Background-with-ctx

Replace 'gocontext.Background' with the var 'ctx'
This commit is contained in:
Derek McGowan 2017-04-05 10:14:49 -07:00 committed by GitHub
commit cccf5d3723

View file

@ -364,11 +364,11 @@ var runCommand = cli.Command{
if err != nil { if err != nil {
return err return err
} }
response, err := containers.Create(gocontext.Background(), create) response, err := containers.Create(ctx, create)
if err != nil { if err != nil {
return err return err
} }
if _, err := containers.Start(gocontext.Background(), &execution.StartRequest{ if _, err := containers.Start(ctx, &execution.StartRequest{
ID: response.ID, ID: response.ID,
}); err != nil { }); err != nil {
return err return err
@ -381,7 +381,7 @@ var runCommand = cli.Command{
if err != nil { if err != nil {
return err return err
} }
if _, err := containers.Delete(gocontext.Background(), &execution.DeleteRequest{ if _, err := containers.Delete(ctx, &execution.DeleteRequest{
ID: response.ID, ID: response.ID,
}); err != nil { }); err != nil {
return err return err