fix: fix write file for go version < 1.16
This commit is contained in:
parent
ae02450bb4
commit
7f91f2d5ef
1 changed files with 2 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
|
|
@ -15,7 +16,7 @@ func writeFile(file string, buf []byte) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
file = filepath.Join(tmpPath, file)
|
file = filepath.Join(tmpPath, file)
|
||||||
err = os.WriteFile(file, buf, 0600)
|
err = ioutil.WriteFile(file, buf, 0600)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue