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
|
@ -2,7 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
gocontext "context"
|
||||
"fmt"
|
||||
"errors"
|
||||
|
||||
"github.com/docker/containerd/api/execution"
|
||||
"github.com/urfave/cli"
|
||||
|
@ -26,7 +26,7 @@ var deleteCommand = cli.Command{
|
|||
|
||||
id := context.Args().First()
|
||||
if id == "" {
|
||||
return fmt.Errorf("container id must be provided")
|
||||
return errors.New("container id must be provided")
|
||||
}
|
||||
|
||||
pid := uint32(context.Int64("pid"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue