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

@@ -2,7 +2,6 @@ package generator
import (
_ "embed"
"io/ioutil"
"os"
"path/filepath"
@@ -36,5 +35,5 @@ func (g *Generator) GenConfig(ctx DirContext, _ parser.Proto, cfg *conf.Config)
return err
}
return ioutil.WriteFile(fileName, []byte(text), os.ModePerm)
return os.WriteFile(fileName, []byte(text), os.ModePerm)
}