mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-09-01 23:36:47 +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:
@@ -3,7 +3,7 @@ package state
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/itchyny/gojq"
|
||||
@@ -59,7 +59,7 @@ func detectPartition(b *block.Partition) PartitionState {
|
||||
}
|
||||
|
||||
func detectBoot() Boot {
|
||||
cmdline, err := ioutil.ReadFile("/proc/cmdline")
|
||||
cmdline, err := os.ReadFile("/proc/cmdline")
|
||||
if err != nil {
|
||||
return Unknown
|
||||
}
|
||||
|
Reference in New Issue
Block a user