diff --git a/common/config.go b/common/config.go index c76db48..78afe53 100644 --- a/common/config.go +++ b/common/config.go @@ -4,7 +4,6 @@ import ( "fmt" "os" - "io/ioutil" "path/filepath" "github.com/BurntSushi/toml" @@ -50,7 +49,7 @@ func InitConfig() { // Write default config if not exists if _, err := os.Stat(Args.Config); os.IsNotExist(err) { - ioutil.WriteFile(Args.Config, File.Toml, 0644) + os.WriteFile(Args.Config, File.Toml, 0644) } // Read config file into memory diff --git a/store/client.go b/store/client.go index b4f9b4f..fe09184 100644 --- a/store/client.go +++ b/store/client.go @@ -8,7 +8,6 @@ import ( "time" "encoding/json" - "io/ioutil" "path/filepath" "github.com/BurntSushi/xgb/xproto" @@ -214,7 +213,7 @@ func (c *Client) Write() { // Write client cache path := filepath.Join(cache.Folder, cache.Name) - err = ioutil.WriteFile(path, data, 0644) + err = os.WriteFile(path, data, 0644) if err != nil { log.Warn("Error writing client cache [", c.Latest.Class, "]") return @@ -233,7 +232,7 @@ func (c *Client) Read() *Info { // Read client info path := filepath.Join(cache.Folder, cache.Name) - data, err := ioutil.ReadFile(path) + data, err := os.ReadFile(path) if os.IsNotExist(err) { log.Info("No client cache found [", c.Latest.Class, "]") return c.Latest