Use github.com/pkg/errors

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2018-03-17 02:15:06 +00:00
parent 916e99d0ad
commit e1fe1abff0
40 changed files with 345 additions and 349 deletions

View File

@@ -51,7 +51,7 @@ var loadCommand = cli.Command{
)
cl, err := client.NewCRIContainerdClient(address, timeout)
if err != nil {
return fmt.Errorf("failed to create grpc client: %v", err)
return errors.Wrap(err, "failed to create grpc client")
}
if timeout > 0 {
ctx, cancel = gocontext.WithTimeout(gocontext.Background(), timeout)