fix write files and deprecated calls

This commit is contained in:
Mikaël Cluseau
2023-11-27 14:08:44 +01:00
parent 69cc01db9b
commit 86d85f014c
6 changed files with 21 additions and 18 deletions

View File

@ -1,12 +1,12 @@
package main
import (
"io/ioutil"
"os"
"strings"
)
func param(name, defaultValue string) (value string) {
ba, err := ioutil.ReadFile("/proc/cmdline")
ba, err := os.ReadFile("/proc/cmdline")
if err != nil {
fatal("could not read /proc/cmdline: ", err)
}