Skip to content

Commit 93f5589

Browse files
thaJeztahmdelapenya
authored andcommitted
network: WithCheckDuplicate: don't set CheckDuplicate value (#2589)
Setting this value is a no-opt, as it's automatically set by the client, and the field will be removed in the next release of the docker module, so let's already remove it. updates 6e086e8, which deprecated this function. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 48b1bef commit 93f5589

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

docker_examples_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ func ExampleNew_withNetwork() {
196196
ctx := context.Background()
197197

198198
net, err := NewNetwork(ctx,
199-
network.WithCheckDuplicate(),
200199
network.WithAttachable(),
201200
// Makes the network internal only, meaning the host machine cannot access it.
202201
// Remove or use `network.WithDriver("bridge")` to change the network's mode.

network/options.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ func WithAttachable() CustomizeOption {
3232
// Deprecated: CheckDuplicate is deprecated since API v1.44, but it defaults to true when sent by the client package to older daemons.
3333
func WithCheckDuplicate() CustomizeOption {
3434
return func(original *types.NetworkCreate) error {
35-
//nolint:staticcheck
36-
original.CheckDuplicate = true
37-
3835
return nil
3936
}
4037
}

0 commit comments

Comments
 (0)