fix: fix write file for go version < 1.16

This commit is contained in:
vicanso 2022-02-19 10:38:38 +08:00
parent ae02450bb4
commit 7f91f2d5ef

View file

@ -1,6 +1,7 @@
package main
import (
"io/ioutil"
"os"
"path/filepath"
@ -15,7 +16,7 @@ func writeFile(file string, buf []byte) error {
}
file = filepath.Join(tmpPath, file)
err = os.WriteFile(file, buf, 0600)
err = ioutil.WriteFile(file, buf, 0600)
if err != nil {
return err
}