Skip to content

Commit

Permalink
do not use io/ioutil
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Jan 18, 2024
1 parent af5f7b3 commit 026d0af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"runtime"
Expand Down Expand Up @@ -105,7 +104,7 @@ func loadConfig(profile string) (*Config, error) {
}
os.MkdirAll(filepath.Dir(fp), 0700)

b, err := ioutil.ReadFile(fp)
b, err := os.ReadFile(fp)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -298,7 +297,7 @@ func (cfg *Config) save(profile string) error {
if err != nil {
return err
}
return ioutil.WriteFile(fp, b, 0644)
return os.WriteFile(fp, b, 0644)
}

// Decode is
Expand Down

0 comments on commit 026d0af

Please sign in to comment.