Update cli package

The old one has bug when showing help message for IntFlags.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang
2016-05-10 13:58:09 +08:00
parent be46e644f6
commit 8477638aab
32 changed files with 2259 additions and 306 deletions
+8 -6
View File
@@ -14,14 +14,15 @@ paused. `,
Description: `The pause command suspends all processes in the instance of the container.
Use runc list to identiy instances of containers and their current status.`,
Action: func(context *cli.Context) {
Action: func(context *cli.Context) error {
container, err := getContainer(context)
if err != nil {
fatal(err)
return err
}
if err := container.Pause(); err != nil {
fatal(err)
return err
}
return nil
},
}
@@ -35,13 +36,14 @@ resumed.`,
Description: `The resume command resumes all processes in the instance of the container.
Use runc list to identiy instances of containers and their current status.`,
Action: func(context *cli.Context) {
Action: func(context *cli.Context) error {
container, err := getContainer(context)
if err != nil {
fatal(err)
return err
}
if err := container.Resume(); err != nil {
fatal(err)
return err
}
return nil
},
}