summaryrefslogtreecommitdiffstats
path: root/pkg/config
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-09-23 23:01:40 -0700
committerGitHub <noreply@github.com>2022-09-23 23:01:40 -0700
commitfd66499c8faddc98ee9985f9b5e7e50320617410 (patch)
tree1c6e3e84ee0a912141fbda61269f5aa687bd8a9f /pkg/config
parente00118376879e7be6633620a8e81c81148027540 (diff)
parent3d79c6a3d3bd939259f0a37b34acc9d5a7ab4759 (diff)
Merge pull request #2167 from xiaoliwang/remove_deprecated
Diffstat (limited to 'pkg/config')
-rw-r--r--pkg/config/app_config.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go
index 9806bcf58..49ff32b04 100644
--- a/pkg/config/app_config.go
+++ b/pkg/config/app_config.go
@@ -2,7 +2,6 @@ package config
import (
"fmt"
- "io/ioutil"
"os"
"path/filepath"
"strings"
@@ -152,7 +151,7 @@ func loadUserConfig(configFiles []string, base *UserConfig) (*UserConfig, error)
file.Close()
}
- content, err := ioutil.ReadFile(path)
+ content, err := os.ReadFile(path)
if err != nil {
return nil, err
}
@@ -243,7 +242,7 @@ func (c *AppConfig) SaveAppState() error {
return err
}
- err = ioutil.WriteFile(filepath, marshalledAppState, 0o644)
+ err = os.WriteFile(filepath, marshalledAppState, 0o644)
if err != nil && os.IsPermission(err) {
// apparently when people have read-only permissions they prefer us to fail silently
return nil
@@ -263,7 +262,7 @@ func loadAppState() (*AppState, error) {
return nil, err
}
- appStateBytes, err := ioutil.ReadFile(filepath)
+ appStateBytes, err := os.ReadFile(filepath)
if err != nil && !os.IsNotExist(err) {
return nil, err
}