Use error.New () directly to output the error message
Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
This commit is contained in:
parent
696e88c813
commit
af86cd4d2f
8 changed files with 13 additions and 12 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue