Use error.New () directly to output the error message

Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
This commit is contained in:
fate-grand-order 2017-02-10 12:32:11 +08:00
parent 696e88c813
commit af86cd4d2f
8 changed files with 13 additions and 12 deletions

View file

@ -20,6 +20,7 @@ import (
"github.com/crosbymichael/console"
"github.com/docker/containerd/api/shim"
"github.com/urfave/cli"
"github.com/pkg/errors"
)
var fifoFlags = []cli.Flag{
@ -75,7 +76,7 @@ var shimCreateCommand = cli.Command{
Action: func(context *cli.Context) error {
id := context.Args().First()
if id == "" {
return fmt.Errorf("container id must be provided")
return errors.New("container id must be provided")
}
service, err := getShimService()
if err != nil {