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
cmd/dist/active.go
vendored
2
cmd/dist/active.go
vendored
|
@ -54,7 +54,7 @@ var activeCommand = cli.Command{
|
|||
}
|
||||
|
||||
tw := tabwriter.NewWriter(os.Stdout, 1, 8, 1, '\t', 0)
|
||||
fmt.Fprintf(tw, "REF\tSIZE\tAGE\n")
|
||||
fmt.Fprintln(tw, "REF\tSIZE\tAGE")
|
||||
for _, active := range active {
|
||||
fmt.Fprintf(tw, "%s\t%s\t%s\n",
|
||||
active.Ref,
|
||||
|
|
4
cmd/dist/fetch.go
vendored
4
cmd/dist/fetch.go
vendored
|
@ -52,11 +52,11 @@ var fetchCommand = cli.Command{
|
|||
}
|
||||
|
||||
if locator == "" {
|
||||
return fmt.Errorf("containerd: remote required")
|
||||
return errors.New("containerd: remote required")
|
||||
}
|
||||
|
||||
if len(args) < 1 {
|
||||
return fmt.Errorf("containerd: object required")
|
||||
return errors.New("containerd: object required")
|
||||
}
|
||||
|
||||
object := args[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue