Merge pull request #891 from songzhibin97/patch-1

fix: usage with deprecated elements
pull/894/head
Eugen Eisler 3 weeks ago committed by GitHub
commit 9b8871f25b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3,7 +3,6 @@ package cli
import ( import (
"bytes" "bytes"
"io" "io"
"io/ioutil"
"os" "os"
"strings" "strings"
"testing" "testing"
@ -26,7 +25,7 @@ func TestInit(t *testing.T) {
func TestReadStdin(t *testing.T) { func TestReadStdin(t *testing.T) {
input := "test input" 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 // No need to cast stdin to *os.File, pass it as io.ReadCloser directly
content, err := ReadStdin(stdin) content, err := ReadStdin(stdin)
if err != nil { if err != nil {

Loading…
Cancel
Save