Use os.ReadFile().
This commit is contained in:
parent
dd7ee3f703
commit
f0a01461fa
5
fcm.go
5
fcm.go
|
@ -15,11 +15,12 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"git.bit5.ru/backend/errors"
|
||||
|
||||
"github.com/go-logr/logr"
|
||||
"golang.org/x/oauth2"
|
||||
|
||||
|
@ -64,7 +65,7 @@ type Credentials struct {
|
|||
}
|
||||
|
||||
func ReadCredentialsFromFile(filename string) (Credentials, error) {
|
||||
data, err := ioutil.ReadFile(filename)
|
||||
data, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
return Credentials{}, errors.WithStack(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue