Skip to content

Commit f28c063

Browse files
committed
cli/command/context: remove deprecated io/ioutil
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 43795ec commit f28c063

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

cli/command/network/connect_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package network
22

33
import (
44
"context"
5-
"io/ioutil"
5+
"io"
66
"testing"
77

88
"github.com/docker/cli/internal/test"
@@ -37,7 +37,7 @@ func TestNetworkConnectErrors(t *testing.T) {
3737
}),
3838
)
3939
cmd.SetArgs(tc.args)
40-
cmd.SetOut(ioutil.Discard)
40+
cmd.SetOut(io.Discard)
4141
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
4242

4343
}

cli/command/network/create_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package network
22

33
import (
44
"context"
5-
"io/ioutil"
5+
"io"
66
"strings"
77
"testing"
88

@@ -137,7 +137,7 @@ func TestNetworkCreateErrors(t *testing.T) {
137137
for key, value := range tc.flags {
138138
assert.NilError(t, cmd.Flags().Set(key, value))
139139
}
140-
cmd.SetOut(ioutil.Discard)
140+
cmd.SetOut(io.Discard)
141141
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
142142

143143
}

cli/command/network/disconnect_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package network
22

33
import (
44
"context"
5-
"io/ioutil"
5+
"io"
66
"testing"
77

88
"github.com/docker/cli/internal/test"
@@ -35,7 +35,7 @@ func TestNetworkDisconnectErrors(t *testing.T) {
3535
}),
3636
)
3737
cmd.SetArgs(tc.args)
38-
cmd.SetOut(ioutil.Discard)
38+
cmd.SetOut(io.Discard)
3939
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
4040
}
4141
}

cli/command/network/list_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package network
22

33
import (
44
"context"
5-
"io/ioutil"
5+
"io"
66
"testing"
77

88
"github.com/docker/cli/internal/test"
@@ -35,7 +35,7 @@ func TestNetworkListErrors(t *testing.T) {
3535
networkListFunc: tc.networkListFunc,
3636
}),
3737
)
38-
cmd.SetOut(ioutil.Discard)
38+
cmd.SetOut(io.Discard)
3939
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
4040
}
4141
}

0 commit comments

Comments
 (0)