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

View file

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