Skip to content

Commit

Permalink
drop io/utils package. (#1188)
Browse files Browse the repository at this point in the history
/kind cleanup

Drop ioutil package.
As it is deprecation , and can be replaced well.

```
Deprecated: As of Go 1.16, the same functionality is now 
provided by package [io](https://pkg.go.dev/io) 
or package [os](https://pkg.go.dev/os), 
and those implementations should be preferred in new code
```

Signed-off-by: zhanluxianshen <[email protected]>
  • Loading branch information
湛露先生 authored Apr 15, 2024
1 parent 1c5f633 commit 9814dd3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"context"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"syscall"
Expand Down Expand Up @@ -84,9 +83,9 @@ func TestWindowsCtrlCHandler(t *testing.T) {
"SIGINT child process")

// Drain stdout and stderr, and wait for the process to exit.
output, err := ioutil.ReadAll(stdout)
output, err := io.ReadAll(stdout)
require.NoError(t, err)
_, err = io.Copy(ioutil.Discard, stderr)
_, err = io.Copy(io.Discard, stderr)
require.NoError(t, err)
require.NoError(t, cmd.Wait())

Expand Down

0 comments on commit 9814dd3

Please sign in to comment.