internal/copy: deprecate io/ioutil (#336)

Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
This commit is contained in:
Lars Lehtonen
2023-09-07 08:23:38 -07:00
committed by GitHub
parent 9d595db5af
commit e2852ca9fb

View File

@@ -4,7 +4,6 @@
package copy
import (
"io/ioutil"
"os"
"path/filepath"
"testing"
@@ -38,7 +37,7 @@ func TestCopyDir_symlinks(t *testing.T) {
t.Fatal(err)
}
err = ioutil.WriteFile(filepath.Join(subModuleDir, "main.tf"), []byte("hello"), 0644)
err = os.WriteFile(filepath.Join(subModuleDir, "main.tf"), []byte("hello"), 0644)
if err != nil {
t.Fatal(err)
}
@@ -74,7 +73,7 @@ func TestCopyDir_symlink_file(t *testing.T) {
t.Fatal(err)
}
err = ioutil.WriteFile(filepath.Join(moduleDir, "main.tf"), []byte("hello"), 0644)
err = os.WriteFile(filepath.Join(moduleDir, "main.tf"), []byte("hello"), 0644)
if err != nil {
t.Fatal(err)
}