chore: 弃用 ioutil

This commit is contained in:
tiglog 2023-10-15 00:32:49 +08:00
parent 2302575edf
commit 663d103dc9

View File

@ -10,7 +10,6 @@ package console
import ( import (
"flag" "flag"
"fmt" "fmt"
"io/ioutil"
"os" "os"
"os/exec" "os/exec"
@ -79,7 +78,7 @@ func (c *cAir) initConfCmd(args []string) {
fmt.Printf("Conf file %s exists, SKIP\n\n", *output) fmt.Printf("Conf file %s exists, SKIP\n\n", *output)
} else { } else {
fmt.Printf("Writing conf to %s ...\n", *output) fmt.Printf("Writing conf to %s ...\n", *output)
ioutil.WriteFile(*output, []byte(conf), 0644) os.WriteFile(*output, []byte(conf), 0644)
fmt.Println("Done") fmt.Println("Done")
} }
} }