Skip to content

Commit

Permalink
fix: remove deprecated io/ioutils package (#2120)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pedromotita committed Mar 12, 2024
1 parent 1f80fa2 commit bd914e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"bytes"
"context"
"fmt"
"io/ioutil"
"io"
"os"
"reflect"
"strings"
Expand Down Expand Up @@ -2092,12 +2092,12 @@ func TestCommandPrintRedirection(t *testing.T) {
t.Error(err)
}

gotErrBytes, err := ioutil.ReadAll(errBuff)
gotErrBytes, err := io.ReadAll(errBuff)
if err != nil {
t.Error(err)
}

gotOutBytes, err := ioutil.ReadAll(outBuff)
gotOutBytes, err := io.ReadAll(outBuff)
if err != nil {
t.Error(err)
}
Expand Down

0 comments on commit bd914e5

Please sign in to comment.