replace 'gocontext.Background' with the var 'ctx'

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
This commit is contained in:
Yanqiang Miao 2017-04-05 17:40:48 +08:00
parent 1ceb1595e7
commit 4aec91fd96

View file

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