Skip to content

Commit bd914e5

Browse files
authored
fix: remove deprecated io/ioutils package (#2120)
ioutils.ReadAll is deprecated since Go 1.16. This commit replaces it with io.ReadAll. See https://pkg.go.dev/io/ioutil\#ReadAll for reference Issue #2119
1 parent 1f80fa2 commit bd914e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: command_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"bytes"
1919
"context"
2020
"fmt"
21-
"io/ioutil"
21+
"io"
2222
"os"
2323
"reflect"
2424
"strings"
@@ -2092,12 +2092,12 @@ func TestCommandPrintRedirection(t *testing.T) {
20922092
t.Error(err)
20932093
}
20942094

2095-
gotErrBytes, err := ioutil.ReadAll(errBuff)
2095+
gotErrBytes, err := io.ReadAll(errBuff)
20962096
if err != nil {
20972097
t.Error(err)
20982098
}
20992099

2100-
gotOutBytes, err := ioutil.ReadAll(outBuff)
2100+
gotOutBytes, err := io.ReadAll(outBuff)
21012101
if err != nil {
21022102
t.Error(err)
21032103
}

0 commit comments

Comments
 (0)