aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/kconfig
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2023-02-23 14:28:18 +0100
committerGitHub <noreply@github.com>2023-02-23 14:28:18 +0100
commit4359978ef22a22ddd5a19adf18cbc80cb44244fb (patch)
tree7952da94e27417b39ddf952d9e0bab431dafc4c5 /pkg/kconfig
parent9e2ebb3c174f1e168bc1fbadd5f02f2e25e314fc (diff)
all: ioutil is deprecated in go1.19 (#3718)
Diffstat (limited to 'pkg/kconfig')
-rw-r--r--pkg/kconfig/config.go4
-rw-r--r--pkg/kconfig/kconfig.go6
2 files changed, 5 insertions, 5 deletions
diff --git a/pkg/kconfig/config.go b/pkg/kconfig/config.go
index 70bdb1b17..a9c571b1d 100644
--- a/pkg/kconfig/config.go
+++ b/pkg/kconfig/config.go
@@ -7,7 +7,7 @@ import (
"bufio"
"bytes"
"fmt"
- "io/ioutil"
+ "os"
"regexp"
)
@@ -105,7 +105,7 @@ func (cf *ConfigFile) Serialize() []byte {
}
func ParseConfig(file string) (*ConfigFile, error) {
- data, err := ioutil.ReadFile(file)
+ data, err := os.ReadFile(file)
if err != nil {
return nil, fmt.Errorf("failed to open .config file %v: %v", file, err)
}
diff --git a/pkg/kconfig/kconfig.go b/pkg/kconfig/kconfig.go
index 84ea00afd..cd05cdbb1 100644
--- a/pkg/kconfig/kconfig.go
+++ b/pkg/kconfig/kconfig.go
@@ -8,7 +8,7 @@ package kconfig
import (
"fmt"
- "io/ioutil"
+ "os"
"path/filepath"
"strings"
"sync"
@@ -118,7 +118,7 @@ type kconfigParser struct {
}
func Parse(target *targets.Target, file string) (*KConfig, error) {
- data, err := ioutil.ReadFile(file)
+ data, err := os.ReadFile(file)
if err != nil {
return nil, fmt.Errorf("failed to open Kconfig file %v: %v", file, err)
}
@@ -329,7 +329,7 @@ func (kp *kconfigParser) includeSource(file string) {
kp.newCurrent(nil)
file = kp.expandString(file)
file = filepath.Join(kp.baseDir, file)
- data, err := ioutil.ReadFile(file)
+ data, err := os.ReadFile(file)
if err != nil {
kp.failf("%v", err)
return