cli: remove deprecated io/ioutil

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 86db51e86e)
Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
Sebastiaan van Stijn 2022-02-25 15:30:38 +01:00 committed by Cory Snider
parent dc4e6835b7
commit a0f0a4fe7a
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ package cli
import (
"errors"
"io/ioutil"
"io"
"testing"
"github.com/spf13/cobra"
@ -119,7 +119,7 @@ func runTestCases(t *testing.T, testCases []testCase) {
for _, tc := range testCases {
cmd := newDummyCommand(tc.validateFunc)
cmd.SetArgs(tc.args)
cmd.SetOut(ioutil.Discard)
cmd.SetOut(io.Discard)
err := cmd.Execute()
assert.ErrorContains(t, err, tc.expectedError)