mirror of
https://github.com/containers/podman.git
synced 2025-12-01 10:38:05 +08:00
pkg: switch to golang native error wrapping
We now use the golang error wrapping format specifier `%w` instead of the deprecated github.com/pkg/errors package. [NO NEW TESTS NEEDED] Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
@@ -3,6 +3,7 @@ package images
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
@@ -15,7 +16,6 @@ import (
|
||||
"github.com/containers/podman/v4/pkg/bindings"
|
||||
"github.com/containers/podman/v4/pkg/domain/entities"
|
||||
"github.com/containers/podman/v4/pkg/errorhandling"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// Pull is the binding for libpod's v2 endpoints for pulling images. Note that
|
||||
@@ -91,7 +91,7 @@ func Pull(ctx context.Context, rawImage string, options *PullOptions) ([]string,
|
||||
images = report.Images
|
||||
case report.ID != "":
|
||||
default:
|
||||
return images, errors.Errorf("failed to parse pull results stream, unexpected input: %v", report)
|
||||
return images, fmt.Errorf("failed to parse pull results stream, unexpected input: %v", report)
|
||||
}
|
||||
}
|
||||
return images, errorhandling.JoinErrors(pullErrors)
|
||||
|
||||
Reference in New Issue
Block a user