From 1031fd24b246718a1136779ca55ec59bc45486d8 Mon Sep 17 00:00:00 2001 From: Patrick Gaskin Date: Fri, 11 Jun 2021 03:43:21 -0400 Subject: [PATCH] cmd/kepubify: Replace ioutil with os for Go 1.16 --- cmd/kepubify/pathtransform_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/kepubify/pathtransform_test.go b/cmd/kepubify/pathtransform_test.go index f21dd2c..03cbdc1 100644 --- a/cmd/kepubify/pathtransform_test.go +++ b/cmd/kepubify/pathtransform_test.go @@ -1,7 +1,6 @@ package main import ( - "io/ioutil" "os" "path/filepath" "reflect" @@ -675,7 +674,7 @@ func (tc transformPathsCase) Run(t *testing.T) { t.Log("===\n") t.Logf("case %#v", tc.What) - td, err := ioutil.TempDir("", "kepubify-test") + td, err := os.MkdirTemp("", "kepubify-test") if err != nil { panic(err) } @@ -696,7 +695,7 @@ func (tc transformPathsCase) Run(t *testing.T) { if err := os.MkdirAll(filepath.Dir(in), 0755); err != nil { panic(err) } - if err := ioutil.WriteFile(fn, []byte(in), 0644); err != nil { + if err := os.WriteFile(fn, []byte(in), 0644); err != nil { panic(err) } }