Skip to content

Commit 6d65ad8

Browse files
committed
don't use deprecated stuff
Signed-off-by: Jason Hall <[email protected]>
1 parent 05e57e3 commit 6d65ad8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/v1/daemon/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func WithContext(ctx context.Context) Option {
9898
type Client interface {
9999
NegotiateAPIVersion(ctx context.Context)
100100
ImageSave(context.Context, []string) (io.ReadCloser, error)
101-
ImageLoad(context.Context, io.Reader, bool) (types.ImageLoadResponse, error)
101+
ImageLoad(context.Context, io.Reader, bool) (api.LoadResponse, error)
102102
ImageTag(context.Context, string, string) error
103103
ImageInspectWithRaw(context.Context, string) (types.ImageInspect, []byte, error)
104104
ImageHistory(context.Context, string) ([]api.HistoryResponseItem, error)

pkg/v1/daemon/write_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"strings"
2323
"testing"
2424

25-
"github.com/docker/docker/api/types"
25+
api "github.com/docker/docker/api/types/image"
2626

2727
"github.com/google/go-containerregistry/pkg/name"
2828
"github.com/google/go-containerregistry/pkg/v1/empty"
@@ -37,16 +37,16 @@ func (r *errReader) Read(_ []byte) (int, error) {
3737
return 0, r.err
3838
}
3939

40-
func (m *MockClient) ImageLoad(ctx context.Context, r io.Reader, _ bool) (types.ImageLoadResponse, error) {
40+
func (m *MockClient) ImageLoad(ctx context.Context, r io.Reader, _ bool) (api.LoadResponse, error) {
4141
if !m.negotiated {
42-
return types.ImageLoadResponse{}, errors.New("you forgot to call NegotiateAPIVersion before calling ImageLoad")
42+
return api.LoadResponse{}, errors.New("you forgot to call NegotiateAPIVersion before calling ImageLoad")
4343
}
4444
if m.wantCtx != nil && m.wantCtx != ctx {
45-
return types.ImageLoadResponse{}, fmt.Errorf("ImageLoad: wrong context")
45+
return api.LoadResponse{}, fmt.Errorf("ImageLoad: wrong context")
4646
}
4747

4848
_, _ = io.Copy(io.Discard, r)
49-
return types.ImageLoadResponse{
49+
return api.LoadResponse{
5050
Body: m.loadBody,
5151
}, m.loadErr
5252
}

0 commit comments

Comments
 (0)