Skip to content

Commit fda034c

Browse files
committed
pause: refactor
This is to simplify code review for the next commit. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 932e834 commit fda034c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pause.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ Use runc list to identify instances of containers and their current status.`,
3030
if err != nil {
3131
return err
3232
}
33-
return container.Pause()
33+
err = container.Pause()
34+
if err != nil {
35+
return err
36+
}
37+
return nil
3438
},
3539
}
3640

@@ -59,6 +63,10 @@ Use runc list to identify instances of containers and their current status.`,
5963
if err != nil {
6064
return err
6165
}
62-
return container.Resume()
66+
err = container.Resume()
67+
if err != nil {
68+
return err
69+
}
70+
return nil
6371
},
6472
}

0 commit comments

Comments
 (0)