mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
fix use-errors-new from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
@@ -38,7 +39,7 @@ func TestImageSearchWithUnauthorizedErrorAndPrivilegeFuncError(t *testing.T) {
|
||||
client: newMockClient(errorMock(http.StatusUnauthorized, "Unauthorized error")),
|
||||
}
|
||||
privilegeFunc := func(_ context.Context) (string, error) {
|
||||
return "", fmt.Errorf("Error requesting privilege")
|
||||
return "", errors.New("Error requesting privilege")
|
||||
}
|
||||
_, err := client.ImageSearch(context.Background(), "some-image", registry.SearchOptions{
|
||||
PrivilegeFunc: privilegeFunc,
|
||||
|
||||
Reference in New Issue
Block a user