main: ioutil.ReadFile is deprecated

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2023-10-31 09:37:43 -04:00
parent e4bbd71991
commit 1bda3de425
Signed by: vbatts
GPG Key ID: E30EFAA812C6E5ED
1 changed files with 1 additions and 2 deletions

View File

@ -4,7 +4,6 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil"
"os" "os"
"github.com/mattn/go-mastodon" "github.com/mattn/go-mastodon"
@ -44,7 +43,7 @@ func main() {
ClientSecret: "asfdasdfasfd", ClientSecret: "asfdasdfasfd",
AccessToken: "asdfasdfadfasfd", AccessToken: "asdfasdfadfasfd",
} }
buf, err := ioutil.ReadFile(ctx.String("config")) buf, err := os.ReadFile(ctx.String("config"))
if err == nil { if err == nil {
tmpconfig := mastodon.Config{} tmpconfig := mastodon.Config{}
err := json.Unmarshal(buf, &tmpconfig) err := json.Unmarshal(buf, &tmpconfig)