From bd914e58d69d65e494b45bdb40e90ca816b92fcc Mon Sep 17 00:00:00 2001
From: Pedro Mota
Date: Tue, 12 Mar 2024 07:42:46 -0300
Subject: [PATCH] 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
---
command_test.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/command_test.go b/command_test.go
index b7d88e4d5..db3369221 100644
--- a/command_test.go
+++ b/command_test.go
@@ -18,7 +18,7 @@ import (
"bytes"
"context"
"fmt"
- "io/ioutil"
+ "io"
"os"
"reflect"
"strings"
@@ -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)
}