main: ioutil.ReadFile is deprecated
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
e4bbd71991
commit
1bda3de425
1 changed files with 1 additions and 2 deletions
3
main.go
3
main.go
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue