Use errors.New() directly to output the error message
Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
This commit is contained in:
parent
b7805198b1
commit
08405824ad
3 changed files with 5 additions and 5 deletions
4
cmd/dist/ingest.go
vendored
4
cmd/dist/ingest.go
vendored
|
@ -2,13 +2,13 @@ package main
|
|||
|
||||
import (
|
||||
contextpkg "context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
contentapi "github.com/docker/containerd/api/services/content"
|
||||
"github.com/docker/containerd/content"
|
||||
"github.com/opencontainers/go-digest"
|
||||
"github.com/urfave/cli"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var ingestCommand = cli.Command{
|
||||
|
@ -48,7 +48,7 @@ var ingestCommand = cli.Command{
|
|||
}
|
||||
|
||||
if ref == "" {
|
||||
return fmt.Errorf("must specify a transaction reference")
|
||||
return errors.New("must specify a transaction reference")
|
||||
}
|
||||
|
||||
ingester := content.NewIngesterFromClient(contentapi.NewContentClient(conn))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue