mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-20 01:42:20 +00:00
art: Move from io/ioutil to io and os packages (#470)
refactor: move from io/ioutil to io and os packages The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. [1]: https://golang.org/doc/go1.16#ioutil Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package machine
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/google/shlex"
|
||||
@@ -12,7 +12,7 @@ func DotToYAML(file string) ([]byte, error) {
|
||||
if file == "" {
|
||||
file = "/proc/cmdline"
|
||||
}
|
||||
dat, err := ioutil.ReadFile(file)
|
||||
dat, err := os.ReadFile(file)
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user