Use os.ReadFile().

This commit is contained in:
Владислав Весельский 2025-01-29 14:13:46 +03:00
parent dd7ee3f703
commit f0a01461fa
1 changed files with 3 additions and 2 deletions

5
fcm.go
View File

@ -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)
}