change: udpate docs

This commit is contained in:
debugtalk
2022-01-08 22:21:42 +08:00
parent c6549f4012
commit 853a456b12
4 changed files with 11 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ package scaffold
import (
"fmt"
"io/ioutil"
"os"
"path"
@@ -62,7 +63,7 @@ func createFolder(folderPath string) error {
func createFile(filePath string, data string) error {
log.Info().Str("filePath", filePath).Msg("create file")
err := os.WriteFile(filePath, []byte(data), 0o644)
err := ioutil.WriteFile(filePath, []byte(data), 0o644)
if err != nil {
log.Error().Err(err).Msg("create file failed")
return err