term_test.go: replace io/ioutil with io and os package

Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
cui fliter
2022-09-14 14:21:27 +08:00
parent a9ba230a40
commit 4c4433c530

View File

@@ -5,7 +5,6 @@
package term_test
import (
"io/ioutil"
"os"
"runtime"
"testing"
@@ -14,7 +13,7 @@ import (
)
func TestIsTerminalTempFile(t *testing.T) {
file, err := ioutil.TempFile("", "TestIsTerminalTempFile")
file, err := os.CreateTemp("", "TestIsTerminalTempFile")
if err != nil {
t.Fatal(err)
}