io/ioutil deprecated (#3217)

This commit is contained in:
guangwu
2023-05-06 17:50:54 +08:00
committed by GitHub
parent 4f13fe8188
commit 63368d8b0c
27 changed files with 85 additions and 89 deletions

View File

@@ -1,7 +1,6 @@
package generator
import (
"io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -14,7 +13,7 @@ import (
func Test_findPbFile(t *testing.T) {
dir := t.TempDir()
protoFile := filepath.Join(dir, "greet.proto")
err := ioutil.WriteFile(protoFile, []byte(`
err := os.WriteFile(protoFile, []byte(`
syntax = "proto3";
package greet;