Skip to content

Commit 7453dbd

Browse files
committed
fix lints
Signed-off-by: cpanato <[email protected]>
1 parent 45877ec commit 7453dbd

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

pkg/build/layer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (l *lazyLayer) Uncompressed() (io.ReadCloser, error) {
6868
}
6969

7070
func (l *lazyLayer) compute() (v1.Layer, error) {
71-
l.Once.Do(func() {
71+
l.Do(func() {
7272
l.layer, l.err = l.buildLayer()
7373
})
7474
return l.layer, l.err

pkg/commands/options/build.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import (
2121
"path/filepath"
2222
"reflect"
2323

24+
"github.com/go-viper/mapstructure/v2"
2425
"github.com/google/go-containerregistry/pkg/name"
2526
"github.com/google/ko/pkg/build"
26-
"github.com/mitchellh/mapstructure"
2727
"github.com/spf13/cobra"
2828
"github.com/spf13/viper"
2929
"golang.org/x/tools/go/packages"

pkg/commands/resolver_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import (
2727
"strings"
2828
"testing"
2929

30-
"github.com/docker/docker/api/types"
3130
"github.com/docker/docker/api/types/image"
31+
"github.com/docker/docker/client"
3232
"github.com/google/go-cmp/cmp"
3333
"github.com/google/go-cmp/cmp/cmpopts"
3434
"github.com/google/go-containerregistry/pkg/crane"
@@ -68,19 +68,19 @@ type erroringClient struct {
6868
daemon.Client
6969

7070
inspectErr error
71-
inspectResp types.ImageInspect
71+
inspectResp image.InspectResponse
7272
inspectBody []byte
7373
}
7474

7575
func (m *erroringClient) NegotiateAPIVersion(context.Context) {}
76-
func (m *erroringClient) ImageLoad(context.Context, io.Reader, bool) (image.LoadResponse, error) {
76+
func (m *erroringClient) ImageLoad(context.Context, io.Reader, ...client.ImageLoadOption) (image.LoadResponse, error) {
7777
return image.LoadResponse{}, errImageLoad
7878
}
7979
func (m *erroringClient) ImageTag(_ context.Context, _ string, _ string) error {
8080
return errImageTag
8181
}
8282

83-
func (m *erroringClient) ImageInspectWithRaw(_ context.Context, _ string) (types.ImageInspect, []byte, error) {
83+
func (m *erroringClient) ImageInspectWithRaw(_ context.Context, _ string) (image.InspectResponse, []byte, error) {
8484
return m.inspectResp, m.inspectBody, m.inspectErr
8585
}
8686

pkg/internal/testing/daemon.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919
"io"
2020
"strings"
2121

22-
"github.com/docker/docker/api/types"
2322
"github.com/docker/docker/api/types/image"
23+
"github.com/docker/docker/client"
2424
"github.com/google/go-containerregistry/pkg/v1/daemon"
2525
)
2626

@@ -29,12 +29,12 @@ type MockDaemon struct {
2929
Tags []string
3030

3131
inspectErr error
32-
inspectResp types.ImageInspect
32+
inspectResp image.InspectResponse
3333
inspectBody []byte
3434
}
3535

3636
func (m *MockDaemon) NegotiateAPIVersion(context.Context) {}
37-
func (m *MockDaemon) ImageLoad(context.Context, io.Reader, bool) (image.LoadResponse, error) {
37+
func (m *MockDaemon) ImageLoad(context.Context, io.Reader, ...client.ImageLoadOption) (image.LoadResponse, error) {
3838
return image.LoadResponse{
3939
Body: io.NopCloser(strings.NewReader("Loaded")),
4040
}, nil
@@ -48,6 +48,6 @@ func (m *MockDaemon) ImageTag(_ context.Context, _ string, tag string) error {
4848
return nil
4949
}
5050

51-
func (m *MockDaemon) ImageInspectWithRaw(_ context.Context, _ string) (types.ImageInspect, []byte, error) {
51+
func (m *MockDaemon) ImageInspectWithRaw(_ context.Context, _ string) (image.InspectResponse, []byte, error) {
5252
return m.inspectResp, m.inspectBody, m.inspectErr
5353
}

0 commit comments

Comments
 (0)