From e7fd450dadb9727ccf9aa8c41610442b4cc76af1 Mon Sep 17 00:00:00 2001 From: Bin <49082129+songzhibin97@users.noreply.github.com> Date: Thu, 29 Aug 2024 16:08:55 +0800 Subject: [PATCH] fix: usage with deprecated elements --- cli/flags_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/flags_test.go b/cli/flags_test.go index 992d70d..865a262 100644 --- a/cli/flags_test.go +++ b/cli/flags_test.go @@ -3,7 +3,6 @@ package cli import ( "bytes" "io" - "io/ioutil" "os" "strings" "testing" @@ -26,7 +25,7 @@ func TestInit(t *testing.T) { func TestReadStdin(t *testing.T) { input := "test input" - stdin := ioutil.NopCloser(strings.NewReader(input)) + stdin := io.NopCloser(strings.NewReader(input)) // No need to cast stdin to *os.File, pass it as io.ReadCloser directly content, err := ReadStdin(stdin) if err != nil {