Skip to content

Commit 37467b5

Browse files
authored
Fix backward-incompat issues in daemon (#993)
We exposed ImageOption, so we need to keep that symbol alive. Also fix some linter complaints.
1 parent 0976a27 commit 37467b5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pkg/v1/daemon/options.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ import (
2222
"github.com/docker/docker/client"
2323
)
2424

25+
// ImageOption is an alias for Option.
26+
// Deprecated: Use Option instead.
27+
type ImageOption Option
28+
29+
// Option is a functional option for daemon operations.
2530
type Option func(*options)
2631

2732
type options struct {

pkg/v1/daemon/write_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func TestWriteDefaultClient(t *testing.T) {
146146
}
147147

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

0 commit comments

Comments
 (0)