Skip to content

Commit

Permalink
Fix backward-incompat issues in daemon (#993)
Browse files Browse the repository at this point in the history
We exposed ImageOption, so we need to keep that symbol alive.

Also fix some linter complaints.
  • Loading branch information
jonjohnsonjr committed Apr 23, 2021
1 parent 0976a27 commit 37467b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pkg/v1/daemon/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ import (
"github.com/docker/docker/client"
)

// ImageOption is an alias for Option.
// Deprecated: Use Option instead.
type ImageOption Option

// Option is a functional option for daemon operations.
type Option func(*options)

type options struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/v1/daemon/write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func TestWriteDefaultClient(t *testing.T) {
}

// Cover default client init and ctx use as well.
ctx := context.WithValue(context.Background(), "hello", "world")
ctx := context.TODO()
defaultClient = func() (Client, error) {
return &MockClient{
loadBody: ioutil.NopCloser(strings.NewReader("Loaded")),
Expand Down

0 comments on commit 37467b5

Please sign in to comment.