diff options
Diffstat (limited to 'pkg/config')
-rw-r--r-- | pkg/config/app_config.go | 7 |
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 } |